:root {
    --primary-color: #4a6fa5;
    --secondary-color: #166088;
    --accent-color: #4cb1a7;
    --text-color: #333;
    --bg-color: #f5f8ff;
    --transition: all 0.4s ease;
}

.dark-mode {
    --primary-color: #8cb4ff;
    --secondary-color: #6b8cbe;
    --text-color: #f0f0f0;
    --bg-color: #0a0a1a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    transition: var(--transition);
    position: relative;
    background: var(--bg-color);
}

/* النجوم للوضع الليلي */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0;
    transition: opacity 1s ease;
}

.dark-mode .stars {
    opacity: 1;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 5s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* القمر للوضع الليلي */
.moon {
    position: fixed;
    top: 40px;
    right: 10%;
    width: 60px;
    height: 60px;
    background: #F0F0F0;
    border-radius: 50%;
    box-shadow: 0 0 20px white;
    z-index: -1;
    opacity: 0;
    transition: opacity 1s ease;
}

.dark-mode .moon {
    opacity: 1;
}

.moon::before {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 15px;
    height: 15px;
    background: #CCC;
    border-radius: 50%;
}

/* الشمس للوضع النهاري */
.sun {
    position: fixed;
    top: 40px;
    right: 10%;
    width: 60px;
    height: 60px;
    background: #FFD700;
    border-radius: 50%;
    box-shadow: 0 0 40px #FFA500;
    z-index: -1;
    opacity: 1;
    transition: opacity 1s ease;
    animation: sunGlow 4s ease-in-out infinite alternate;
}

.dark-mode .sun {
    opacity: 0;
}

@keyframes sunGlow {
    0% { box-shadow: 0 0 40px #FFA500; }
    100% { box-shadow: 0 0 60px #FFD700, 0 0 80px #FFA500; }
}

/* الغيوم للوضع النهاري */
.clouds {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 1;
    transition: opacity 1s ease;
}

.dark-mode .clouds {
    opacity: 0;
}

.cloud {
    position: absolute;
    background: rgba(230, 240, 255, 0.9);
    border-radius: 100px;
    opacity: 0.8;
    animation: float 20s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(200, 220, 240, 0.6);
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: rgba(240, 248, 255, 0.9);
    border-radius: 100px;
}

.cloud::before {
    width: 50px;
    height: 50px;
    top: -25px;
    left: 10px;
}

.cloud::after {
    width: 60px;
    height: 60px;
    top: -35px;
    right: 10px;
}

@keyframes float {
    0%, 100% { transform: translateX(-100px) translateY(0px); }
    25% { transform: translateX(20px) translateY(-10px); }
    50% { transform: translateX(100px) translateY(5px); }
    75% { transform: translateX(200px) translateY(-5px); }
}


.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

.profile-section {
    text-align: center;
    margin: 2rem 0;
    padding: 2rem;
    width: 100%;
    transition: var(--transition);
    /* إزالة الخلفية والحدود لجعل العناصر عائمة */
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    /* إضافة خلفية شبه شفافة للصورة فقط */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.profile-img:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.name {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    /* خلفية شبه شفافة للنص */
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    padding: 1rem 2rem;
    border-radius: 15px;
    display: inline-block;
}

.bio {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: var(--text-color);
    /* خلفية شبه شفافة للنص الحيوي */
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    padding: 1.5rem 2rem;
    border-radius: 15px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.social-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    padding: 1rem 1.5rem;
    border-radius: 15px;
    /* خلفية شبه شفافة لكل رابط */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.2);
}

.social-icon {
    width: 35px;
    height: 35px;
    margin-left: 1rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon-image {
    width: 35px;
    height: 35px;
    margin-left: 1rem;
    border-radius: 8px;
    object-fit: cover;
}

.social-name {
    font-size: 1.1rem;
    font-weight: 600;
    flex-grow: 1;
    text-align: right;
}

.floating-btn {
    position: fixed;
    bottom: 2.5rem;
    right: 2.5rem;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 1000;
    transition: var(--transition);
    border: none;
    font-size: 1.8rem;
}

.floating-btn:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.theme-toggle {
    position: fixed;
    top: 2.5rem;
    left: 2.5rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 1000;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1.5rem;
}

.theme-toggle:hover {
    transform: rotate(30deg);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
    display: flex;
}

.modal-content {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    padding: 2.5rem;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    transform: translateY(50px);
    transition: transform 0.5s ease;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.modal.show .modal-content {
    transform: translateY(0);
}

.form-group {
    margin-bottom: 1.8rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid rgba(74, 111, 165, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-color);
    font-size: 1rem;
    transition: border-color 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.3s, box-shadow 0.3s;
    display: inline-block;
    width: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.close {
    position: absolute;
    top: 1.2rem;
    left: 1.5rem;
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--primary-color);
}

.notification {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 2rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 3000;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.notification.show {
    opacity: 1;
}

.notification.success {
    border-left: 5px solid #4caf50;
}

.notification.error {
    border-left: 5px solid #f44336;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .profile-section {
        padding: 1.5rem;
    }
    
    .name {
        font-size: 2rem;
        padding: 0.8rem 1.5rem;
    }
    
    .bio {
        font-size: 1.1rem;
        padding: 1.2rem 1.5rem;
    }
    
    .social-link {
        padding: 0.8rem 1rem;
    }
    
    .social-icon {
        width: 30px;
        height: 30px;
        font-size: 1.2rem;
    }
    
    .theme-toggle, .floating-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .theme-toggle {
        top: 1.5rem;
        left: 1.5rem;
    }
    
    .floating-btn {
        bottom: 1.5rem;
        right: 1.5rem;
    }
    
    .sun, .moon {
        width: 50px;
        height: 50px;
        top: 30px;
        right: 5%;
    }
}
