:root {
    --bg-dark: #050a14;
    --gold: #d4af37;
    --gold-glow: #ffdf00;
    --white: #ffffff;
    --white-soft: #e0e0e0;
    --glass: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
    --font-main: 'Inter', sans-serif;
    --font-script: 'Playfair Display', serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--white);
    font-family: var(--font-main);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

#app {
    height: 100%;
    width: 100%;
}

.screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 1s ease-in-out;
    z-index: 1;
}

.screen.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.glass {
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 20px;
}

/* Stars Background */
.stars {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(white, rgba(255, 255, 255, 0.2) 2px, transparent 40px);
    background-size: 100px 100px;
    opacity: 0.1;
    animation: moveStars 100s linear infinite;
    pointer-events: none;
}

@keyframes moveStars {
    from { background-position: 0 0; }
    to { background-position: 1000px 1000px; }
}

/* Envelope Screen */
.envelope-container {
    width: 90%;
    max-width: 350px;
    z-index: 10;
}

.envelope-card {
    padding: 2rem;
    text-align: center;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease-out;
}

.script-font {
    font-family: var(--font-script);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.5rem;
    font-style: italic;
}

.envelope-card p {
    font-weight: 300;
    color: var(--white-soft);
    margin-bottom: 2rem;
    letter-spacing: 0.5px;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--gold), #b38f00);
    color: #000;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.5);
}

.btn-primary:active {
    transform: translateY(-1px);
}

/* Greeting Screen */
#greeting-screen {
    background: radial-gradient(circle at center, #101a2e 0%, #050a14 100%);
    overflow-y: auto;
    display: block; /* Change from flex center to block for natural scroll */
    padding: 4rem 0 2rem; /* Add more top padding */
}

.content-wrapper {
    width: 95%;
    max-width: 400px;
    margin: 0 auto;
    z-index: 10;
    position: relative;
}

.greeting-card {
    padding: 2rem;
    text-align: center;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.subtitle {
    font-size: 0.8rem;
    color: var(--white-soft);
    opacity: 0.7;
    margin-bottom: 0.2rem;
}

.main-title {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.divider {
    font-size: 1.2rem;
    color: var(--gold);
    margin: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.divider span {
    margin: 0 10px;
}

.arabic-text {
    font-size: 2.5rem;
    color: var(--white);
    margin: 1.5rem 0 0.5rem;
    direction: rtl;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.arabic-trans {
    font-size: 0.9rem;
    color: var(--white-soft);
    font-style: italic;
    margin-bottom: 2rem;
}

.main-wish {
    margin: 2rem 0;
}

.main-wish p {
    font-weight: 300;
    font-size: 1.1rem;
    color: var(--gold);
}

.main-wish h3 {
    font-size: 1.5rem;
    font-weight: 800;
}

.message {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--white-soft);
    margin-bottom: 2rem;
}

.mohon-maaf {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--gold);
    margin-bottom: 3rem;
}

.sender-section {
    margin-bottom: 3rem;
}

.sender-section p {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 2px;
    opacity: 0.5;
    margin-bottom: 0.5rem;
}

#display-sender {
    font-size: 1.8rem;
    color: var(--gold);
}

/* Music Control */
.music-control {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
}

.btn-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--glass);
    border: 1px solid var(--border);
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Lanterns */
.lanterns {
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    pointer-events: none;
}

.lantern {
    width: 40px;
    height: 60px;
    background: var(--gold);
    clip-path: polygon(20% 0%, 80% 0%, 100% 20%, 100% 80%, 80% 100%, 20% 100%, 0% 80%, 0% 20%);
    box-shadow: 0 0 20px var(--gold-glow);
    animation: swing 3s ease-in-out infinite alternate;
    transform-origin: top center;
    opacity: 0.6;
}

@keyframes swing {
    from { transform: rotate(-5deg); }
    to { transform: rotate(5deg); }
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease-out;
}

.btn-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--white);
    opacity: 0.5;
    cursor: pointer;
}

.modal h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--gold);
}

.modal p {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 1rem;
    border-radius: 12px;
    color: var(--white);
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s;
}

input:focus {
    border-color: var(--gold);
}

.full-width {
    width: 100%;
    display: flex;
    justify-content: center;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .main-title { font-size: 2.2rem; }
    .arabic-text { font-size: 2rem; }
    #display-sender { font-size: 1.5rem; }
}
