@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 50%, #FFFFFF 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.screen {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    transition: opacity 0.5s ease;
}

.hidden {
    display: none !important;
}

/* شاشة الدخول */
.login-container {
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 60px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
    animation: fadeIn 0.8s ease;
}

.question {
    font-size: 2.5rem;
    color: #64B5F6;
    margin-bottom: 30px;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

#nameInput {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.2rem;
    border: 2px solid #90CAF9;
    border-radius: 10px;
    outline: none;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s ease;
    background: white;
    color: #424242;
}

#nameInput:focus {
    border-color: #64B5F6;
    box-shadow: 0 0 15px rgba(100, 181, 246, 0.3);
}

.error-message {
    margin-top: 20px;
    color: #EF5350;
    font-size: 1.1rem;
    min-height: 30px;
    animation: shake 0.5s ease;
}

/* تحكم الأغنية في شاشة الدخول */
.audio-controls {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.song-btn {
    background: linear-gradient(135deg, #64B5F6 0%, #90CAF9 100%);
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 30px;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(100, 181, 246, 0.4);
    transition: all 0.3s ease;
}

.song-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(100, 181, 246, 0.6);
}

.song-btn:active {
    transform: translateY(0);
}

.volume-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: #64B5F6;
}

.volume-label {
    white-space: nowrap;
}

#songVolume {
    width: 180px;
    accent-color: #64B5F6;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* الصفحة الرئيسية */
.main-container {
    max-width: 900px;
    width: 100%;
    text-align: center;
    animation: fadeIn 1s ease;
}

/* الفيديو الترحيبي */
.video-container {
    position: relative;
    margin-bottom: 40px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    background: #000;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeIn 1.2s ease;
}

.birthday-video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
}

.video-controls {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 15px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-container:hover .video-controls {
    opacity: 1;
}

.video-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.video-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.video-btn:active {
    transform: scale(0.95);
}

/* الأنيميشن */
.animation-container {
    margin-bottom: 40px;
}

.bears-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    animation: float 3s ease-in-out infinite;
    transition: all 0.3s ease;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.bears-container .tenor-gif-embed {
    width: 100%;
    max-width: 400px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.bears-container .tenor-gif-embed:hover {
    transform: scale(1.05);
}

.birthday-gif-container {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.birthday-gif-container .tenor-gif-embed {
    width: 100%;
    max-width: 300px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-15px) scale(1.1);
    }
}

/* النص البرمجي */
.code-container {
    background: #1E1E1E;
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: right;
    direction: ltr;
}

.code-block {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #D4D4D4;
    margin: 0;
    white-space: pre-wrap;
}

.code-keyword {
    color: #569CD6;
}

.code-variable {
    color: #9CDCFE;
}

.code-string {
    color: #CE9178;
}

.code-function {
    color: #DCDCAA;
}

.code-property {
    color: #4EC9B0;
}

.code-number {
    color: #B5CEA8;
}

/* الرسالة الشخصية */
.message-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 15px;
    margin: 30px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.typed-message {
    font-size: 1.4rem;
    line-height: 2;
    color: #424242;
    font-weight: 400;
}

.typed-message::after {
    content: '|';
    animation: blink 1s infinite;
    color: #64B5F6;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* الزر النهائي */
.final-button {
    background: linear-gradient(135deg, #64B5F6 0%, #90CAF9 100%);
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 1.3rem;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    box-shadow: 0 5px 20px rgba(100, 181, 246, 0.4);
    transition: all 0.3s ease;
    margin: 30px 0;
}

.final-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(100, 181, 246, 0.6);
}

.final-button:active {
    transform: translateY(0);
}

/* الرسالة الأخيرة */
.final-message {
    margin-top: 40px;
    animation: fadeIn 0.8s ease;
}

.message-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(227, 242, 253, 0.95) 100%);
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 3px solid #90CAF9;
}

.message-box h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

.message-box p {
    font-size: 1.3rem;
    line-height: 2;
    color: #424242;
    margin: 15px 0;
}

.signature {
    margin-top: 30px;
    font-weight: 600;
    color: #64B5F6;
    font-size: 1.4rem !important;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .question {
        font-size: 2rem;
    }
    
    .bears-container .tenor-gif-embed {
        max-width: 280px;
    }
    
    .birthday-gif-container .tenor-gif-embed {
        max-width: 250px;
    }
    
    .code-block {
        font-size: 0.9rem;
    }
    
    .typed-message {
        font-size: 1.1rem;
    }
    
    .message-box {
        padding: 30px 20px;
    }
    
    .message-box p {
        font-size: 1.1rem;
    }
    
    .video-container {
        max-width: 100%;
        margin: 20px 10px;
    }
    
    .video-controls {
        opacity: 1;
        bottom: 10px;
        padding: 8px 12px;
    }
    
    .video-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}
