/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* إضافة خصائص لتحسين جودة العرض */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Page Entry Animations */
.container {
    animation: pageSlideIn 0.8s ease-out;
}

.header {
    animation: headerSlideIn 1s ease-out 0.2s both;
}

.music-player {
    animation: musicPlayerSlideIn 1s ease-out 0.4s both;
}

.contact {
    animation: contactSlideIn 1s ease-out 0.6s both;
}

.projects {
    animation: projectsSlideIn 1s ease-out 0.8s both;
}

.footer {
    animation: footerSlideIn 1s ease-out 1s both;
}

/* Profile Image Special Animation */
.profile-image {
    animation: profileImageZoom 1.2s ease-out 0.5s both;
}

.profile-info {
    animation: profileInfoSlide 1s ease-out 0.7s both;
}

.location {
    animation: locationFade 1s ease-out 0.9s both;
}

/* Contact Cards Animation */
.contact-card {
    animation: contactCardPop 0.6s ease-out both;
}

.contact-card:nth-child(1) { animation-delay: 0.8s; }
.contact-card:nth-child(2) { animation-delay: 0.9s; }
.contact-card:nth-child(3) { animation-delay: 1s; }
.contact-card:nth-child(4) { animation-delay: 1.1s; }

/* Project Cards Animation */
.project-card {
    animation: projectCardSlide 0.8s ease-out both;
}

.project-card:nth-child(1) { animation-delay: 1s; }
.project-card:nth-child(2) { animation-delay: 1.2s; }
.project-card:nth-child(3) { animation-delay: 1.4s; }

/* Entry Animations Keyframes */
@keyframes pageSlideIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes headerSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes musicPlayerSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes contactSlideIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes projectsSlideIn {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes footerSlideIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes profileImageZoom {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes profileInfoSlide {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes locationFade {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes contactCardPop {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes projectCardSlide {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* إضافة خصائص لتحسين جودة العرض */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    backface-visibility: hidden;
    transform: translateZ(0);
    /* إضافة خصائص إضافية لتحسين الجودة */
    -webkit-backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    -webkit-perspective: 1000;
    -webkit-transform-style: preserve-3d;
    will-change: transform;
}

/* تحسين جودة النصوص */
body {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(135deg, #000000 0%, #0a0a0a 50%, #111111 100%);
    color: #ffffff;
    min-height: 100vh;
    direction: rtl;
    overflow-x: hidden;
    /* إضافة خصائص لتحسين جودة النصوص */
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    text-align: left;
    margin-bottom: 5px;
    padding: 40px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    border-radius: 20px;
    pointer-events: none;
    z-index: 1;
}

.header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    border-radius: 20px;
}

.header:hover::after {
    opacity: 1;
}

.header:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
}

.profile-section {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 30px;
    flex-wrap: wrap;
    flex-direction: row;
    width: 100%;
    position: relative;
    z-index: 2;
}

.profile-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(136, 136, 136, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0);
    transition: all 0.3s ease;
    order: 1;
    flex-shrink: 0;
    margin-right: 20px;
    /* إضافة خصائص لتحسين جودة الصورة */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.profile-image:hover {
    /* تقليل التكبير وإضافة تأثيرات أخرى بدلاً من التكبير الكبير */
    transform: translateY(-2px) translateZ(0);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* إضافة خصائص لتحسين جودة الصورة */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.profile-info {
    text-align: left;
    order: 2;
    flex-grow: 1;
    flex-shrink: 0;
    margin-left: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.name {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.highlight {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.bio {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

#changingText {
    transition: all 0.5s ease;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    direction: ltr;
    display: inline;
    position: relative;
    filter: brightness(1.2);
    transform: translateY(0);
}

#changingText.developer {
    color: #6711f394;
    text-shadow: 
        0 0 15px rgba(103, 17, 243, 0.8),
        0 0 30px rgba(103, 17, 243, 0.6),
        0 0 45px rgba(103, 17, 243, 0.4);
    filter: brightness(1.3) saturate(1.2);
    transform: translateY(-2px);
}

#changingText.gamer {
    color: #c52331;
    text-shadow: 
        0 0 15px rgba(255, 71, 87, 0.8),
        0 0 30px rgba(255, 71, 87, 0.6),
        0 0 45px rgba(255, 71, 87, 0.4);
    filter: brightness(1.3) saturate(1.2);
    transform: translateY(-2px);
}

#changingText.discord-bot {
    color: #4150f7;
    text-shadow: 
        0 0 15px rgba(88, 101, 242, 0.8),
        0 0 30px rgba(88, 101, 242, 0.6),
        0 0 45px rgba(88, 101, 242, 0.4);
    filter: brightness(1.3) saturate(1.2);
    transform: translateY(-2px);
}

#changingText::after {
    content: '|';
    animation: blink 1s infinite;
    color: inherit;
    position: absolute;
    right: -8px;
    top: 0;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.location {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    justify-content: flex-start;
    order: 3;
    width: 100%;
    margin-top: 10px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.location i {
    color: #ffffff;
    text-shadow: 
        0 0 12px rgba(255, 255, 255, 0.8),
        0 0 24px rgba(255, 255, 255, 0.6),
        0 0 36px rgba(255, 255, 255, 0.4);
    filter: brightness(1.3) saturate(1.2);
    font-size: 1.1rem;
}

.location span {
    color: #ffffff;
    font-weight: 600;
    text-shadow: 
        0 0 12px rgba(255, 255, 255, 0.8),
        0 0 24px rgba(252, 252, 252, 0.6),
        0 0 36px rgba(100, 181, 246, 0.4);
    filter: brightness(1.2) saturate(1.1);
}

.location .country {
    color: #2ed573;
    font-weight: 600;
    text-shadow: 
        0 0 15px rgba(46, 213, 115, 0.8),
        0 0 25px rgba(46, 213, 115, 0.5),
        0 0 35px rgba(46, 213, 115, 0.3);
    filter: brightness(1.2) saturate(1.1);
}

/* Music Player Styles */
.music-player {
    background: transparent;
    border-radius: 0;
    padding: 20px 12px;
    margin-bottom: 15px;
    backdrop-filter: none;
    border: none;
    box-shadow: none;
    transition: none;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    max-width: 100%;
    margin: 0 auto;
}

.player-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.song-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    min-width: 0;
    overflow: hidden;
}

.song-cover {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
    /* إضافة خصائص لتحسين جودة صورة الأغنية */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.song-progress-section {
    display: flex;
    flex-direction: column;
    gap: -100px;
    flex: 1;
    min-width: 0;
    align-items: flex-end;
    margin-top: -6px;
}

.song-cover-section {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.song-title-main {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
    margin: 5 0 2px 0;
    padding-left: 0;
}

.time-display {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.current-time,
.total-time {
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    min-width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.progress-bar-container {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
    direction: ltr;
    min-width: 80px;
}

.progress-bar {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffffff, #f0f0f0);
    width: 0%;
    transition: width 0.1s ease;
    border-radius: 2px;
}

.progress-handle {
    position: absolute;
    top: 50%;
    right: 100%;
    transform: translate(50%, -50%);
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
}

.control-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 6px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
}

.control-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
}

.play-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.play-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.volume-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
}

.volume-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 2px;
    border-radius: 50%;
    width: 25px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
}

.volume-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
}

.volume-slider-container {
    position: relative;
}

.volume-slider {
    width: 50px;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    direction: ltr;
    position: relative;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #ffffff, #f0f0f0);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 6px rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.volume-slider::-moz-range-thumb {
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #ffffff, #f0f0f0);
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 1px 6px rgba(255, 255, 255, 0.5);
}

/* إضافة خلفية ديناميكية للـ volume slider */
.volume-slider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #ffffff;
    border-radius: 2px;
    width: var(--volume-width, 50%);
    transition: width 0.1s ease;
}

/* Projects Section */
.projects {
    margin-bottom: 40px;
}

.projects h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.project-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.project-card:hover::before {
    opacity: 1;
}

.project-card:hover {
    /* تقليل التكبير وتحسين التأثيرات */
    transform: translateY(-8px) translateZ(0);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.5);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
    position: relative;
    z-index: 2;
}

.project-header h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #ffffff;
    transition: all 0.3s ease;
}

.project-card:hover .project-header h3 {
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    transform: translateY(-3px);
}

.project-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.tag {
    background: rgba(0, 0, 0, 0.4);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.project-card:hover .tag {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
    color: #ffffff;
    font-weight: 600;
}

.project-description {
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    margin-bottom: 20px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.project-card:hover .project-description {
    color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

.project-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.project-link {
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 25px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.project-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-weight: 600;
}

/* Contact Section */
.contact {
    margin-bottom: 40px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    max-width: 700px;
    margin: 0 auto;
}

.contact-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.contact-card-link:hover {
    text-decoration: none;
    color: inherit;
}

.contact-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-align: center;
    /* إضافة خصائص لتحسين جودة العرض */
    backface-visibility: hidden;
    transform: translateZ(0);
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.contact-card:hover::before {
    opacity: 1;
}

.contact-card:hover {
    /* تقليل التكبير وإضافة تأثيرات أخرى */
    transform: translateY(-2px) translateZ(0);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.5);
}

.contact-card:nth-child(1):hover {
    background: rgba(234, 67, 53, 0.2);
    border-color: rgba(234, 67, 53, 0.6);
    box-shadow: 0 8px 25px rgba(234, 67, 53, 0.4);
}

.contact-card-link:nth-child(2):hover .contact-card {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.contact-card-link:nth-child(3):hover .contact-card {
    background: rgba(157, 78, 221, 0.2);
    border-color: rgba(216, 78, 221, 0.6);
    box-shadow: 0 8px 25px rgba(209, 78, 221, 0.4);
}

.contact-card:nth-child(4):hover {
    background: rgba(88, 101, 242, 0.2);
    border-color: rgba(88, 101, 242, 0.6);
    box-shadow: 0 8px 25px rgba(88, 101, 242, 0.4);
}

.contact-icon {
    font-size: 1rem;
    margin-bottom: 6px;
    color: #ffffff;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 6px auto;
    /* إضافة خصائص لتحسين جودة الأيقونات */
    backface-visibility: hidden;
    transform: translateZ(0);
}

.contact-card:hover .contact-icon {
    background: rgba(255, 255, 255, 0.1);
    /* تقليل التكبير */
    transform: translateY(-1px) translateZ(0);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.contact-icon span {
    font-size: 0.9rem !important;
}

.contact-info {
    position: relative;
    z-index: 2;
    text-align: center;
}

.contact-info p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.7rem;
    transition: all 0.3s ease;
}

.contact-card:hover .contact-info p {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 40px;
}

.footer p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        padding: 30px 20px;
        text-align: center;
    }
    
    .profile-section {
        flex-direction: column;
        text-align: center;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .profile-info {
        text-align: center;
        order: 2;
    }
    
    .profile-image {
        order: 1;
    }
    
    .name {
        font-size: 2rem;
    }
    
    .location {
        justify-content: center;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    /* Music Player Responsive */
    .music-player {
        padding: 12px 8px;
    }
    
    .player-container {
        flex-direction: row;
        gap: 6px;
        max-width: 100%;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .volume-controls {
        order: 1;
    }
    
    .player-controls {
        order: 2;
    }
    
    .song-progress-section {
        order: 3;
        flex: 1;
        min-width: 140px;
    }
    
    .song-cover-section {
        order: 4;
    }
    
    .song-title-main {
        max-width: 120px;
        font-size: 0.7rem;
    }
    
    .volume-slider {
        width: 40px;
    }
    
    .progress-bar-container {
        min-width: 80px;
    }
}

@media (max-width: 480px) {
    .name {
        font-size: 1.8rem;
    }
    
    .bio {
        font-size: 1rem;
    }
    
    .project-card {
        padding: 20px;
    }
    
    .contact-card {
        padding: 15px;
    }
    
    /* Music Player Mobile */
    .music-player {
        padding: 10px 6px;
    }
    
    .player-container {
        gap: 4px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .volume-controls {
        order: 1;
        gap: 4px;
    }
    
    .player-controls {
        order: 2;
    }
    
    .song-progress-section {
        order: 3;
        flex: 1;
        min-width: 120px;
    }
    
    .song-cover-section {
        order: 4;
    }
    
    .song-title-main {
        max-width: 100px;
        font-size: 0.65rem;
    }
    
    .song-cover {
        width: 24px;
        height: 24px;
    }
    
    .control-btn {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .volume-btn {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
    
    .volume-slider {
        width: 40px;
        height: 2px;
    }
    
    .volume-slider::-webkit-slider-thumb {
        width: 8px;
        height: 8px;
    }
    
    .volume-slider::-moz-range-thumb {
        width: 8px;
        height: 8px;
    }
    
    .progress-bar-container {
        height: 2px;
        min-width: 80px;
    }
    
    .progress-handle {
        width: 6px;
        height: 6px;
    }
    
    .current-time,
    .total-time {
        font-size: 0.65rem;
        min-width: 24px;
    }
    
    .time-display {
        gap: 6px;
    }
}

/* شاشات صغيرة جداً */
@media (max-width: 320px) {
    .player-container {
        gap: 4px;
    }
    
    .song-progress-section {
        min-width: 100px;
    }
    
    .song-title-main {
        font-size: 0.6rem;
        max-width: 80px;
    }
    
    .control-btn {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
    }
    
    .volume-btn {
        width: 18px;
        height: 18px;
    }
    
    .volume-slider {
        width: 30px;
    }
    
    .progress-bar-container {
        min-width: 60px;
    }
    
    .current-time,
    .total-time {
        font-size: 0.6rem;
        min-width: 20px;
    }
}

/* تحسينات للشاشات الكبيرة */
@media (min-width: 1200px) {
    .player-container {
        max-width: 650px;
    }
    
    .song-progress-section {
        min-width: 200px;
    }
    
    .song-title-main {
        max-width: 180px;
    }
    
    .volume-slider {
        width: 60px;
    }
}

/* Animation for page load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* تحسين الأنيميشن للعناصر النصية */
.name {
    animation: nameGlow 1.5s ease-out 0.8s both;
}

.bio {
    animation: bioSlide 1s ease-out 1s both;
}

#changingText {
    animation: textColorChange 1s ease-out 1.2s both;
}

@keyframes nameGlow {
    0% {
        opacity: 0;
        transform: translateY(-10px);
        text-shadow: 0 0 0 rgba(255, 255, 255, 0);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    }
}

@keyframes bioSlide {
    0% {
        opacity: 0;
        transform: translateX(-15px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes textColorChange {
    0% {
        opacity: 0;
        filter: brightness(0.5);
    }
    100% {
        opacity: 1;
        filter: brightness(1.2);
    }
}

/* تحسين أنيميشن الأيقونات */
.contact-icon {
    animation: iconBounce 0.8s ease-out both;
}

.contact-card:nth-child(1) .contact-icon { animation-delay: 0.9s; }
.contact-card:nth-child(2) .contact-icon { animation-delay: 1s; }
.contact-card:nth-child(3) .contact-icon { animation-delay: 1.1s; }
.contact-card:nth-child(4) .contact-icon { animation-delay: 1.2s; }

@keyframes iconBounce {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-180deg);
    }
    50% {
        transform: scale(1.1) rotate(-90deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* تحسين أنيميشن مشغل الموسيقى */
.song-cover {
    animation: coverRotate 2s ease-out 0.6s both;
}

@keyframes coverRotate {
    0% {
        opacity: 0;
        transform: rotate(-90deg) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

/* إضافة أنيميشن للعناوين */
.projects h2 {
    animation: titleSlide 1s ease-out 0.9s both;
}

@keyframes titleSlide {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* تحسين الاستجابة للأنيميشن */
@media (max-width: 768px) {
    .container {
        animation-duration: 0.6s;
    }
    
    .header {
        animation-duration: 0.8s;
    }
    
    .profile-image {
        animation-duration: 1s;
    }
    
    .contact-card {
        animation-duration: 0.5s;
    }
    
    .project-card {
        animation-duration: 0.6s;
    }
}

/* تحسين الأداء للأنيميشن */
.container,
.header,
.music-player,
.contact,
.projects,
.footer,
.profile-image,
.profile-info,
.location,
.contact-card,
.project-card {
    will-change: transform, opacity;
}

/* إزالة will-change بعد انتهاء الأنيميشن */
.container {
    animation-fill-mode: both;
}

.container.animation-complete,
.header.animation-complete,
.music-player.animation-complete,
.contact.animation-complete,
.projects.animation-complete,
.footer.animation-complete,
.profile-image.animation-complete,
.profile-info.animation-complete,
.location.animation-complete,
.contact-card.animation-complete,
.project-card.animation-complete {
    will-change: auto;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* تحسينات إضافية للاستجابة */
@media (max-width: 1024px) {
    .music-player {
        padding: 10px;
    }
    
    .player-container {
        max-width: 500px;
        gap: 8px;
    }
    
    .song-progress-section {
        min-width: 160px;
    }
    
    .song-title-main {
        max-width: 140px;
    }
    
    .volume-slider {
        width: 40px;
    }
}

/* إصلاح مشاكل التداخل */
.music-player * {
    box-sizing: border-box;
}

.player-container > * {
    flex-shrink: 0;
}

.song-title-main {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* تحسين الأداء */
.progress-fill,
.progress-handle {
    will-change: width, right;
}

.volume-slider::before {
    will-change: width;
} 

/* تحسينات خاصة للأيقونات والعناصر التفاعلية */
.contact-icon i,
.contact-icon span,
.control-btn i,
.volume-btn i {
    /* تحسين جودة الأيقونات */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform;
}

/* تحسين جودة الأزرار والعناصر التفاعلية */
.control-btn,
.volume-btn,
.contact-card,
.project-card,
.project-link {
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform;
    -webkit-backface-visibility: hidden;
    -webkit-transform: translateZ(0);
}

/* تحسين جودة النصوص في العناصر التفاعلية */
.contact-info p,
.project-header h3,
.project-description,
.song-title-main {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
} 