/* ================ الأساسيات ================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    /* ألوان الموف والنبيتي */
    --main-purple: #9B30FF;      /* موف لامع */
    --dark-purple: #800080;      /* نبيتي */
    --light-purple: #D8BFD8;     /* موف فاتح */
    --pink: #FF69B4;             /* وردي */
    --gold: #FFD700;             /* ذهبي */
    --white: #FFFFFF;
    --black: #000000;
    --transparent-black: rgba(0, 0, 0, 0.7);
}

body {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(135deg, var(--black) 0%, #2d1b69 100%);
    color: var(--white);
    min-height: 100vh;
    overflow-x: hidden;
    direction: rtl;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ================ الصفحات ================ */
.page {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.page.active {
    display: block;
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* ================ خلفية النجوم والثلج ================ */
.stars-bg, .snow-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

/* ================ زر الموسيقى ================ */
.music-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--main-purple), var(--dark-purple));
    border: 2px solid var(--gold);
    color: white;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
    transition: all 0.3s;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.music-toggle:hover {
    transform: scale(1.1);
    background: linear-gradient(45deg, var(--dark-purple), var(--main-purple));
    box-shadow: 0 8px 20px rgba(155, 48, 255, 0.4);
}

.music-toggle:active {
    transform: scale(0.95);
}

.music-toggle.muted {
    background: linear-gradient(45deg, #666, #888);
    opacity: 0.7;
}

/* ================ صفحة الهدية ================ */
.gift-box {
    background: linear-gradient(145deg, var(--dark-purple), var(--main-purple));
    border-radius: 25px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    border: 3px solid var(--gold);
    position: relative;
    max-width: 450px;
    width: 90%;
    animation: pulse 2s infinite;
    margin-top: 20px;
}

.gift-ribbon {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 35px;
    animation: bounce 1s infinite alternate;
}

.gift-title {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--white);
}

.highlight {
    color: var(--gold);
    text-shadow: 0 0 10px var(--gold);
}

.gift-subtitle {
    font-size: 1.1rem;
    color: var(--light-purple);
    margin-bottom: 25px;
}

.gift-lock {
    font-size: 50px;
    margin: 25px 0;
    animation: shake 1.5s infinite;
}

.gift-btn {
    background: linear-gradient(45deg, var(--pink), var(--main-purple));
    color: var(--white);
    border: none;
    padding: 15px 35px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    margin-top: 20px;
    box-shadow: 0 8px 15px rgba(155, 48, 255, 0.4);
    min-height: 50px;
    touch-action: manipulation;
}

.gift-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(155, 48, 255, 0.6);
}

.gift-btn:active {
    transform: translateY(-2px);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes bounce {
    from { transform: translateX(-50%) translateY(0); }
    to { transform: translateX(-50%) translateY(-10px); }
}

@keyframes shake {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

/* ================ صفحة كلمة السر ================ */
.password-box {
    background: var(--transparent-black);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    border: 2px solid var(--main-purple);
    margin-top: 20px;
}

.lock-icon {
    font-size: 45px;
    margin-bottom: 15px;
    color: var(--gold);
}

.password-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--gold);
}

.password-hint {
    font-size: 1rem;
    color: var(--light-purple);
    margin-bottom: 25px;
    font-style: italic;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 25px 0;
}

#passwordInput {
    padding: 15px;
    font-size: 1.4rem;
    text-align: center;
    border: 2px solid var(--main-purple);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    letter-spacing: 5px;
    transition: all 0.3s;
    font-family: 'Cairo', sans-serif;
    touch-action: manipulation;
    -webkit-appearance: none;
    appearance: none;
}

#passwordInput:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 20px var(--gold);
    animation: inputGlow 0.5s;
}

.password-btn {
    background: linear-gradient(45deg, var(--main-purple), var(--pink));
    color: var(--white);
    border: none;
    padding: 15px;
    font-size: 1.1rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    min-height: 50px;
    touch-action: manipulation;
}

.password-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(155, 48, 255, 0.4);
}

.password-btn:active {
    transform: translateY(-1px);
}

.teasing-text {
    color: var(--pink);
    font-size: 1rem;
    margin: 15px 0;
    font-weight: bold;
}

.attempts {
    color: var(--light-purple);
    margin: 10px 0;
    font-size: 0.95rem;
}

.error-message {
    color: #ff6b6b;
    min-height: 24px;
    margin: 10px 0;
    font-size: 0.9rem;
}

/* ================ صفحة الانفجار ================ */
.big-s, .big-y {
    position: absolute;
    font-size: 150px;
    font-weight: bold;
    color: var(--gold);
    text-shadow: 0 0 30px var(--gold);
    animation: explodeIn 1s ease-out;
    z-index: 1;
}

.big-s {
    top: 25%;
    left: 20%;
}

.big-y {
    top: 25%;
    right: 20%;
}

@keyframes explodeIn {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

.explosion-message {
    position: absolute;
    bottom: 25%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 2;
    width: 90%;
    padding: 0 20px;
}

.journey-btn {
    background: linear-gradient(45deg, var(--gold), var(--pink));
    color: var(--black);
    border: none;
    padding: 18px 40px;
    font-size: 1.4rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 25px;
    animation: pulse 2s infinite;
    min-height: 60px;
    touch-action: manipulation;
    width: 100%;
    max-width: 350px;
}

.journey-btn:active {
    transform: scale(0.98);
}

/* ================ صفحة المترو ================ */
.metro-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 15px;
    margin-top: 80px;
}

.metro-map {
    position: relative;
    height: 80px;
    margin-bottom: 30px;
    overflow: hidden;
}

.metro-line {
    position: absolute;
    top: 50%;
    left: 5%;
    right: 5%;
    height: 4px;
    background: var(--main-purple);
    transform: translateY(-50%);
}

.station-dot {
    position: absolute;
    top: 50%;
    width: 35px;
    height: 35px;
    background: var(--dark-purple);
    border: 3px solid var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    color: var(--white);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
    touch-action: manipulation;
}

.station-dot:nth-child(2) { left: 10%; }
.station-dot:nth-child(3) { left: 30%; }
.station-dot:nth-child(4) { left: 50%; }
.station-dot:nth-child(5) { left: 70%; }
.station-dot:nth-child(6) { left: 90%; }

.active-dot {
    background: var(--gold);
    color: var(--black);
    transform: translateY(-50%) scale(1.2);
    box-shadow: 0 0 20px var(--gold);
}

.station-display {
    background: var(--transparent-black);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    border: 2px solid var(--main-purple);
    min-height: 450px;
}

.station {
    display: none;
}

.active-station {
    display: block;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.station-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-purple);
}

.station-number {
    font-size: 1.1rem;
    color: var(--gold);
    margin-bottom: 8px;
    display: block;
}

.station-title {
    font-size: 1.5rem;
    color: var(--white);
    line-height: 1.3;
}

/* ================ تنسيقات الصور ================ */
.photo-frame {
    width: 250px;
    height: 250px;
    margin: 0 auto 25px;
    border: 5px solid var(--gold);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.station-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
    display: block;
}

.station-photo:hover {
    transform: scale(1.05);
}

.photo-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 1rem;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.photo-gallery {
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-radius: 15px;
    margin-bottom: 25px;
    position: relative;
    border: 3px solid var(--main-purple);
}

.gallery-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.gallery-photo {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.12s linear;
    display: block;
    top: 0;
    left: 0;
}

.gallery-photo.active {
    opacity: 1;
}

.station-text {
    font-size: 1.2rem;
    text-align: center;
    line-height: 1.5;
    color: var(--light-purple);
    margin-bottom: 25px;
    padding: 0 10px;
}

.next-station-btn {
    background: linear-gradient(45deg, var(--main-purple), var(--dark-purple));
    color: var(--white);
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 10px;
    cursor: pointer;
    display: block;
    margin: 25px auto 0;
    transition: all 0.3s;
    min-height: 50px;
    touch-action: manipulation;
    width: 100%;
    max-width: 300px;
}

.next-station-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(155, 48, 255, 0.4);
}

.next-station-btn:active {
    transform: translateY(-1px);
}

.final-message {
    text-align: center;
    padding: 30px 20px;
}

.final-btn {
    background: linear-gradient(45deg, var(--gold), var(--pink));
    color: var(--black);
    border: none;
    padding: 18px 35px;
    font-size: 1.3rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 25px;
    animation: pulse 2s infinite;
    min-height: 60px;
    touch-action: manipulation;
    width: 100%;
    max-width: 350px;
}

.final-btn:active {
    transform: scale(0.98);
}

/* ================ صفحة الظرف والرسالة ================ */
.envelope {
    width: 280px;
    height: 180px;
    margin: 0 auto 30px;
    position: relative;
    cursor: pointer;
    animation: floatEnvelope 3s infinite ease-in-out;
}

.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 140px solid transparent;
    border-right: 140px solid transparent;
    border-top: 90px solid var(--pink);
    z-index: 2;
}

.envelope-body {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 280px;
    height: 130px;
    background: var(--main-purple);
    border-radius: 0 0 10px 10px;
    z-index: 1;
}

.stamp {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 50px;
    height: 50px;
    background: var(--gold);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: rotate(-15deg);
}

.stamp-text {
    font-weight: bold;
    color: var(--black);
    font-size: 0.9rem;
}

.to-label {
    position: absolute;
    bottom: 25px;
    right: 25px;
    color: var(--white);
    font-size: 1.1rem;
    font-weight: bold;
}

.envelope-btn {
    background: linear-gradient(45deg, var(--main-purple), var(--dark-purple));
    color: var(--white);
    border: none;
    padding: 18px 35px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 20px;
    animation: pulse 2s infinite;
    min-height: 55px;
    touch-action: manipulation;
    width: 100%;
    max-width: 300px;
}

.envelope-btn:active {
    transform: scale(0.98);
}

.letter-content {
    display: none;
    max-width: 800px;
    margin: 30px auto;
    background: linear-gradient(145deg, var(--dark-purple), var(--black));
    padding: 25px;
    border-radius: 20px;
    border: 3px solid var(--gold);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.letter-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-purple);
}

.letter-date {
    color: var(--gold);
    margin-top: 8px;
    font-style: italic;
    font-size: 0.95rem;
}

.letter-body {
    line-height: 1.7;
    font-size: 1rem;
}

.salutation {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: var(--pink);
    font-weight: bold;
}

.paragraph {
    margin-bottom: 20px;
    color: var(--white);
}

.emphasize {
    color: var(--gold);
    font-weight: bold;
    font-size: 1.1rem;
}

.confession-section {
    background: rgba(255, 105, 180, 0.1);
    padding: 25px;
    border-radius: 15px;
    margin: 30px 0;
    text-align: center;
    border-left: 5px solid var(--pink);
}

.heart-icon {
    font-size: 35px;
    margin-bottom: 12px;
    animation: heartbeat 1.5s infinite;
}

.memories-list, .love-list {
    list-style: none;
    padding-right: 20px;
    margin: 12px 0;
}

.memories-list li, .love-list li {
    padding: 6px 0;
    color: var(--light-purple);
    font-size: 0.95rem;
}

.important-section {
    background: rgba(255, 215, 0, 0.1);
    padding: 20px;
    border-radius: 15px;
    margin: 25px 0;
    border: 2px dashed var(--gold);
}

.big-confession {
    text-align: center;
    margin: 40px 0;
    padding: 30px 20px;
    background: rgba(155, 48, 255, 0.2);
    border-radius: 20px;
    position: relative;
    animation: pulse 3s infinite;
}

.confetti-small {
    position: absolute;
    width: 15px;
    height: 15px;
    background: var(--pink);
    border-radius: 50%;
    animation: float 3s infinite;
}

.confetti-small:nth-child(1) { top: 15px; left: 15px; }
.confetti-small:nth-child(2) { bottom: 15px; right: 15px; }

.love-word {
    color: #ff0000;
    font-size: 2.8rem;
    text-shadow: 0 0 20px #ff0000;
    font-family: 'Dancing Script', cursive;
    animation: glowRed 2s infinite;
    display: block;
    margin: 10px 0;
}

.closing {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid var(--light-purple);
}

.wish {
    text-align: center;
    margin-bottom: 30px;
}

.final-greeting {
    font-size: 1.3rem;
    color: var(--gold);
    margin-top: 12px;
    font-weight: bold;
}

.signature {
    text-align: left;
    margin-top: 30px;
}

.signature-name {
    font-size: 1.8rem;
    color: var(--pink);
    font-weight: bold;
    margin: 8px 0;
    font-family: 'Dancing Script', cursive;
}

.year {
    font-size: 2.5rem;
    color: var(--gold);
    font-weight: bold;
    margin: 15px 0;
}

.finish-btn {
    background: linear-gradient(45deg, var(--pink), var(--main-purple));
    color: var(--white);
    border: none;
    padding: 18px 40px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    display: block;
    margin: 40px auto 0;
    transition: all 0.3s;
    min-height: 55px;
    touch-action: manipulation;
    width: 100%;
    max-width: 350px;
}

.finish-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 25px rgba(255, 105, 180, 0.4);
}

.finish-btn:active {
    transform: scale(1.02);
}

@keyframes floatEnvelope {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

@keyframes glowRed {
    0%, 100% { text-shadow: 0 0 10px #ff0000; }
    50% { text-shadow: 0 0 25px #ff0000; }
}

@keyframes inputGlow {
    0%, 100% { box-shadow: 0 0 10px var(--gold); }
    50% { box-shadow: 0 0 20px var(--gold); }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* ================ التجاوب مع الشاشات الصغيرة ================ */
@media (max-width: 768px) {
    .container {
        padding: 12px;
        padding-top: 80px; /* مسافة لمنع اختفاء المحتوى */
        min-height: 100vh;
    }
    
    .page {
        min-height: 100%;
    }
    
    .gift-box {
        padding: 25px 15px;
        margin-top: 10px;
        width: 95%;
        border-radius: 20px;
    }
    
    .gift-title {
        font-size: 1.8rem;
    }
    
    .gift-subtitle {
        font-size: 1rem;
    }
    
    .gift-lock {
        font-size: 45px;
    }
    
    .gift-btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 1.1rem;
    }
    
    .password-box {
        width: 95%;
        padding: 20px 15px;
        margin-top: 10px;
    }
    
    #passwordInput {
        padding: 12px;
        font-size: 1.3rem;
    }
    
    .password-btn {
        width: 100%;
        padding: 12px;
    }
    
    .station-title {
        font-size: 1.3rem;
    }
    
    .station-header {
        padding-bottom: 12px;
        margin-bottom: 15px;
    }
    
    .station-number {
        font-size: 1rem;
    }
    
    .photo-frame {
        width: 200px;
        height: 200px;
        margin-bottom: 20px;
    }
    
    .photo-gallery {
        height: 200px;
        margin-bottom: 20px;
    }
    
    .station-text {
        font-size: 1rem;
        padding: 0 8px;
    }
    
    .next-station-btn {
        width: 95%;
        padding: 12px 20px;
        font-size: 1rem;
        margin: 20px auto;
    }
    
    .station-display {
        padding: 15px;
        min-height: 400px;
    }
    
    .big-s, .big-y {
        font-size: 120px;
    }
    
    .big-s {
        left: 8%;
        top: 20%;
    }
    
    .big-y {
        right: 8%;
        top: 20%;
    }
    
    .explosion-message {
        bottom: 30%;
    }
    
    .journey-btn {
        width: 95%;
        padding: 15px 20px;
        font-size: 1.1rem;
    }
    
    .letter-content {
        padding: 20px 12px;
        width: 100%;
        margin: 20px 0;
    }
    
    .letter-header {
        margin-bottom: 20px;
    }
    
    .letter-header h2 {
        font-size: 1.6rem;
    }
    
    .letter-body {
        font-size: 0.95rem;
    }
    
    .paragraph {
        margin-bottom: 18px;
    }
    
    .salutation {
        font-size: 1.2rem;
    }
    
    .confession-section {
        padding: 20px;
        margin: 25px 0;
    }
    
    .heart-icon {
        font-size: 30px;
    }
    
    .memories-list li,
    .love-list li {
        font-size: 0.9rem;
        padding: 5px 0;
    }
    
    .big-confession {
        padding: 25px 15px;
        margin: 30px 0;
    }
    
    .love-word {
        font-size: 2rem;
    }
    
    .signature {
        margin-top: 20px;
    }
    
    .signature-name {
        font-size: 1.5rem;
    }
    
    .year {
        font-size: 1.8rem;
    }
    
    .finish-btn {
        width: 95%;
        padding: 12px 20px;
        font-size: 1.1rem;
        margin: 30px auto 0;
    }
    
    .music-toggle {
        bottom: 12px;
        left: 12px;
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    .envelope {
        width: 240px;
        height: 150px;
        margin-bottom: 25px;
    }
    
    .envelope-flap {
        border-left: 120px solid transparent;
        border-right: 120px solid transparent;
        border-top: 75px solid var(--pink);
    }
    
    .envelope-body {
        width: 240px;
        height: 115px;
    }
    
    .envelope-btn {
        width: 95%;
        padding: 12px 20px;
        font-size: 1.1rem;
    }
    
    .final-btn {
        width: 95%;
        padding: 15px 20px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    body {
        font-size: 14px;
    }
    
    .container {
        padding: 8px;
        padding-top: 80px;
        min-height: 100vh;
        margin: 0;
    }
    
    .page {
        min-height: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .metro-map {
        height: 60px;
        margin-bottom: 15px;
    }
    
    .metro-line {
        height: 3px;
    }
    
    .station-dot {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
        border-width: 2px;
    }
    
    .station-dot:nth-child(2) { left: 8%; }
    .station-dot:nth-child(3) { left: 28%; }
    .station-dot:nth-child(4) { left: 50%; }
    .station-dot:nth-child(5) { left: 72%; }
    .station-dot:nth-child(6) { left: 92%; }
    
    .station-display {
        padding: 12px;
        min-height: 350px;
        border-radius: 15px;
    }
    
    .station-header {
        margin-bottom: 12px;
        padding-bottom: 10px;
        border-bottom-width: 1px;
    }
    
    .station-number {
        font-size: 0.9rem;
        margin-bottom: 5px;
    }
    
    .station-title {
        font-size: 1.2rem;
        line-height: 1.3;
    }
    
    .photo-frame {
        width: 180px;
        height: 180px;
        margin: 0 auto 15px;
        border-width: 4px;
        border-radius: 12px;
    }
    
    .photo-gallery {
        height: 180px;
        margin-bottom: 15px;
        border-radius: 12px;
        border-width: 2px;
    }
    
    .station-text {
        font-size: 0.95rem;
        line-height: 1.4;
        margin-bottom: 15px;
        padding: 0 5px;
    }
    
    .next-station-btn {
        width: 100%;
        max-width: none;
        padding: 10px 15px;
        font-size: 1rem;
        margin: 15px auto;
        border-radius: 8px;
        min-height: 45px;
        touch-action: manipulation;
    }
    
    .gift-box {
        width: 95%;
        padding: 18px 12px;
        margin-top: 5px;
        border-radius: 18px;
        border-width: 2px;
    }
    
    .gift-ribbon {
        font-size: 30px;
        top: -15px;
    }
    
    .gift-title {
        font-size: 1.6rem;
        margin-bottom: 8px;
    }
    
    .gift-subtitle {
        font-size: 0.95rem;
        margin-bottom: 15px;
    }
    
    .gift-lock {
        font-size: 40px;
        margin: 15px 0;
    }
    
    .gift-btn {
        width: 100%;
        padding: 10px 15px;
        font-size: 1rem;
        border-radius: 25px;
        min-height: 45px;
    }
    
    .password-box {
        width: 95%;
        padding: 18px 12px;
        margin-top: 5px;
        border-radius: 15px;
        border-width: 2px;
    }
    
    .lock-icon {
        font-size: 40px;
        margin-bottom: 12px;
    }
    
    .password-title {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }
    
    .password-hint {
        font-size: 0.95rem;
        margin-bottom: 18px;
        line-height: 1.3;
    }
    
    .input-group {
        gap: 12px;
    }
    
    #passwordInput {
        padding: 10px;
        font-size: 1.3rem;
        letter-spacing: 4px;
        border-radius: 8px;
        border-width: 2px;
        min-height: 45px;
    }
    
    .password-btn {
        width: 100%;
        padding: 10px 15px;
        font-size: 1rem;
        border-radius: 8px;
        min-height: 45px;
    }
    
    .teasing-text {
        font-size: 0.9rem;
        margin: 10px 0;
    }
    
    .attempts {
        font-size: 0.85rem;
        margin: 8px 0;
    }
    
    .big-s, .big-y {
        font-size: 90px;
    }
    
    .big-s {
        left: 3%;
        top: 15%;
    }
    
    .big-y {
        right: 3%;
        top: 15%;
    }
    
    .explosion-message {
        bottom: 25%;
        width: 95%;
        padding: 15px 10px;
    }
    
    .explosion-message h2 {
        font-size: 1.4rem;
        margin-bottom: 12px;
    }
    
    .journey-btn,
    .final-btn {
        width: 95%;
        max-width: none;
        padding: 12px 15px;
        font-size: 1rem;
        border-radius: 25px;
        min-height: 45px;
    }
    
    .letter-content {
        width: 95%;
        max-width: 100%;
        padding: 15px 10px;
        margin: 15px auto;
        border-radius: 15px;
        border-width: 2px;
    }
    
    .letter-header {
        margin-bottom: 18px;
        padding-bottom: 12px;
        border-bottom-width: 1px;
    }
    
    .letter-header h2 {
        font-size: 1.4rem;
        line-height: 1.3;
    }
    
    .letter-date {
        font-size: 0.85rem;
        margin-top: 6px;
    }
    
    .letter-body {
        font-size: 0.93rem;
        line-height: 1.5;
    }
    
    .paragraph {
        margin-bottom: 15px;
    }
    
    .salutation {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    .emphasize {
        font-size: 1rem;
    }
    
    .confession-section {
        padding: 15px;
        margin: 20px 0;
        border-radius: 10px;
        border-left-width: 4px;
    }
    
    .confession-section h3 {
        font-size: 1.1rem;
        line-height: 1.3;
    }
    
    .heart-icon {
        font-size: 28px;
        margin-bottom: 10px;
    }
    
    .memories-list,
    .love-list {
        padding-right: 15px;
        margin: 10px 0;
    }
    
    .memories-list li,
    .love-list li {
        font-size: 0.9rem;
        padding: 4px 0;
    }
    
    .important-section {
        padding: 15px;
        margin: 20px 0;
        border-radius: 10px;
        border-width: 2px;
    }
    
    .important-section h3 {
        font-size: 1.1rem;
        line-height: 1.3;
    }
    
    .big-confession {
        padding: 18px 12px;
        margin: 25px 0;
        border-radius: 12px;
    }
    
    .big-confession h2 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .love-word {
        font-size: 1.6rem;
        margin: 8px 0;
    }
    
    .confetti-small {
        width: 12px;
        height: 12px;
    }
    
    .closing {
        margin-top: 25px;
        padding-top: 15px;
        border-top-width: 1px;
    }
    
    .wish {
        text-align: center;
        margin-bottom: 20px;
    }
    
    .wish h4 {
        font-size: 1rem;
        line-height: 1.3;
        margin-bottom: 10px;
    }
    
    .final-greeting {
        font-size: 1.1rem;
        margin-top: 8px;
    }
    
    .signature {
        text-align: left;
        margin-top: 20px;
    }
    
    .signature p {
        font-size: 0.95rem;
    }
    
    .signature-name {
        font-size: 1.4rem;
        margin: 6px 0;
    }
    
    .year {
        font-size: 1.6rem;
        margin: 10px 0;
    }
    
    .finish-btn {
        width: 95%;
        max-width: none;
        padding: 10px 15px;
        font-size: 1rem;
        border-radius: 25px;
        margin: 25px auto 0;
        min-height: 45px;
    }
    
    .music-toggle {
        bottom: 10px;
        left: 10px;
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
        border-width: 2px;
        min-height: 44px;
        min-width: 44px;
    }
    
    .envelope {
        width: 220px;
        height: 140px;
        margin-bottom: 20px;
    }
    
    .envelope-flap {
        border-left: 110px solid transparent;
        border-right: 110px solid transparent;
        border-top: 70px solid var(--pink);
    }
    
    .envelope-body {
        width: 220px;
        height: 105px;
    }
    
    .stamp {
        width: 40px;
        height: 40px;
        top: 12px;
        left: 12px;
    }
    
    .stamp-text {
        font-size: 0.8rem;
    }
    
    .to-label {
        bottom: 15px;
        right: 15px;
        font-size: 0.95rem;
    }
    
    .envelope-btn {
        width: 95%;
        max-width: none;
        padding: 10px 15px;
        font-size: 1rem;
        border-radius: 25px;
        margin-top: 15px;
        min-height: 45px;
    }
    
    .final-message {
        text-align: center;
        padding: 20px 10px;
    }
    
    .final-message h3 {
        font-size: 1.1rem;
        line-height: 1.3;
    }
    
    /* منع التكبير على الجوال */
    input, textarea, select, button {
        font-size: 16px !important;
    }
    
    /* تحسينات اللمس */
    button, .station-dot, .music-toggle, .next-station-btn {
        min-height: 44px;
        min-width: 44px;
    }
}

/* تحسينات للشاشات الصغيرة جداً */
@media (max-width: 360px) {
    .countdown-bar {
        min-height: 85px;
        padding: 4px;
    }
    
    .countdown-content {
        gap: 8px;
    }
    
    .countdown-text {
        font-size: 0.7rem;
    }
    
    .countdown-item {
        min-width: 40px;
        max-width: 45px;
        padding: 3px 4px;
    }
    
    .countdown-item span {
        font-size: 1rem;
    }
    
    .countdown-item small {
        font-size: 0.55rem;
    }
    
    .station-dot {
        width: 25px;
        height: 25px;
        font-size: 0.7rem;
        border-width: 1.5px;
    }
    
    .metro-map {
        height: 55px;
        margin-bottom: 12px;
    }
    
    .station-display {
        min-height: 320px;
        padding: 10px;
    }
    
    .photo-frame {
        width: 160px;
        height: 160px;
        margin-bottom: 12px;
        border-width: 3px;
    }
    
    .photo-gallery {
        height: 160px;
        margin-bottom: 12px;
    }
    
    .station-title {
        font-size: 1.1rem;
    }
    
    .station-text {
        font-size: 0.9rem;
    }
    
    .gift-box {
        padding: 15px 10px;
    }
    
    .gift-title {
        font-size: 1.4rem;
    }
    
    .password-box {
        padding: 15px 10px;
    }
    
    .big-s, .big-y {
        font-size: 80px;
    }
    
    .letter-content {
        padding: 12px 8px;
    }
    
    .letter-header h2 {
        font-size: 1.3rem;
    }
    
    .letter-body {
        font-size: 0.9rem;
    }
    
    .love-word {
        font-size: 1.4rem;
    }
}

/* تحسينات للشاشات الأصغر من 320px */
@media (max-width: 320px) {
    .container {
        padding: 5px;
        padding-top: 85px;
    }
    
    .metro-map {
        height: 50px;
    }
    
    .station-dot {
        width: 23px;
        height: 23px;
        font-size: 0.65rem;
        border-width: 1px;
    }
    
    .station-display {
        min-height: 300px;
        padding: 8px;
    }
    
    .photo-frame {
        width: 150px;
        height: 150px;
        margin-bottom: 10px;
    }
    
    .photo-gallery {
        height: 150px;
    }
    
    .station-header {
        margin-bottom: 10px;
        padding-bottom: 8px;
    }
    
    .station-title {
        font-size: 1rem;
    }
    
    .station-text {
        font-size: 0.85rem;
    }
    
    .gift-box {
        padding: 12px 8px;
    }
    
    .gift-title {
        font-size: 1.3rem;
    }
    
    .password-box {
        padding: 12px 8px;
    }
    
    #passwordInput {
        font-size: 1.1rem;
    }
    
    .big-s, .big-y {
        font-size: 70px;
    }
    
    .letter-content {
        padding: 10px 6px;
    }
    
    .love-word {
        font-size: 1.3rem;
    }
}

/* تحسينات للشاشات المتوسطة */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 20px;
        padding-top: 70px;
    }
    
    .countdown-bar {
        min-height: 65px;
    }
    
    .countdown-icon {
        display: inline-block;
        font-size: 1.8rem;
    }
    
    .countdown-text {
        font-size: 1rem;
    }
    
    .countdown-item span {
        font-size: 1.8rem;
    }
}

/* تحسينات للشاشات الكبيرة */
@media (min-width: 1025px) {
    .countdown-icon {
        display: inline-block;
        font-size: 2rem;
    }
    
    .countdown-text {
        font-size: 1.1rem;
    }
    
    .countdown-item span {
        font-size: 2rem;
    }
}

/* منع التكبير في حقول الإدخال على الجوال */
input, textarea, select {
    font-size: 16px !important;
}

/* تحسين اللمس على الجوال */
button, .station-dot, .music-toggle {
    min-height: 44px;
    min-width: 44px;
}

/* تحسين الصور في الجوال */
.station-photo {
    max-width: 100%;
    height: auto;
}

/* اجعل صور المعرض تملأ الحاوية وتقطع الأجزاء الزائدة */
.gallery-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* تحسينات إضافية للجوال */
@media (hover: none) and (pointer: coarse) {
    .gift-btn:hover, .password-btn:hover, .next-station-btn:hover,
    .journey-btn:hover, .final-btn:hover, .envelope-btn:hover,
    .finish-btn:hover {
        transform: none;
    }
    
    .countdown-item:hover {
        transform: none;
    }
    
    .station-photo:hover {
        transform: none;
    }
    
    .music-toggle:hover {
        transform: none;
    }
    
    /* تحسينات اللمس */
    button:active, .station-dot:active {
        transform: scale(0.95);
        transition: transform 0.1s;
    }
}

/* تصحيح اتجاه الحروف في الإدخال */
#passwordInput {
    direction: ltr;
    text-align: center;
}

/* تحسينات WebKit (Safari, Chrome) */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    select,
    textarea,
    input {
        font-size: 16px !important;
    }
}

/* تحسين الأداء */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* تحسينات للـ iOS */
@supports (-webkit-touch-callout: none) {
    .container {
        min-height: -webkit-fill-available;
    }
    
    .page {
        min-height: -webkit-fill-available;
    }
}