[x-cloak] { 
    display: none !important; 
}

/* Osnovna tipografija i glatko ponašanje */
html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: #292524;
    -webkit-tap-highlight-color: transparent;
}

.font-serif {
    font-family: 'Cormorant Garamond', Georgia, serif;
}

.font-script {
    font-family: 'Alex Brush', cursive;
}

/* Sakrivanje skrolbara za vodoravne tabove uz očuvanje dodira */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.luxury-card {
    background: rgba(255, 255, 255, 0.95); 
    border: 1px solid rgba(230, 207, 172, 0.55);
    box-shadow: 0 10px 25px -5px rgba(180, 140, 90, 0.08), 0 4px 10px rgba(0, 0, 0, 0.03);
    border-radius: 12px;
}

/* ==========================================================================
   ANIMIRANA KOVERTA (OPTIMIZOVANA ZA TELEFONE I VELIKE EKRANE)
   ========================================================================== */
#intro-screen {
    background: radial-gradient(circle at center, rgba(45, 30, 15, 0.97) 0%, rgba(12, 8, 4, 0.99) 100%);
    perspective: 1200px;
    height: 100dvh;
}

/* Dimenzije koverte – prilagođene za male telefone */
.envelope-wrapper {
    position: relative;
    width: 290px;
    height: 190px;
    cursor: pointer;
    perspective: 1200px;
    transform-style: preserve-3d;
    transition: transform 0.4s ease;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .envelope-wrapper {
        width: 330px;
        height: 215px;
    }
}

.envelope-wrapper:active {
    transform: scale(0.98);
}

.envelope-back {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #aa7c26 0%, #8b6217 50%, #6d4b0d 100%);
    border-radius: 8px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7), 0 0 25px rgba(212, 175, 55, 0.2);
}



/* Pismo unutar koverte */
/* Pismo unutar koverte – popunjava kovertu proporcionalno */
.letter {
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 12px;
    right: 12px;
    width: calc(100% - 24px) !important;
    height: calc(100% - 24px) !important;
    background: #fffdfa;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    z-index: 20;
    transition: transform 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
    overflow: hidden;
}


.letter-inner {
    padding: 6px;
    height: 100%;
    box-sizing: border-box;
}

.letter-border {
    border: 1.5px solid #d4af37;
    outline: 1px dashed rgba(212, 175, 55, 0.6);
    outline-offset: -3px;
    height: 100%;
    border-radius: 4px;
    padding: 8px;
    text-align: center;
    background: radial-gradient(circle at center, #ffffff 60%, #faf6ec 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Prednji džep (SVG) */
.envelope-front-pocket {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    border-radius: 0 0 8px 8px;
}

/* Gornji poklopac koverte */
.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 105px;
    transform-origin: top center;
    transform-style: preserve-3d;
    transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 20;
}

@media (min-width: 640px) {
    .envelope-flap {
        height: 118px;
    }
}

/* Voštani pečat */
/* Voštani pečat sa zlatnim reljefom */
.wax-seal {
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at 35% 35%, #f7df94 0%, #d4a737 40%, #996e1b 85%, #6e4c0d 100%);
    border-radius: 50%;
    border: 2px solid #fff5d6;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    transition: opacity 0.3s ease 0.15s, transform 0.3s ease;
}

.wax-seal .seal-text {
    font-size: 14px;
    font-weight: 800;
    color: #463007;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.4);
    user-select: none;
}

/* Kada se koverta otvori, pečat elegantno nestaje */
.envelope-wrapper.open .wax-seal {
    opacity: 0;
    transform: translateX(-50%) scale(0.6);
}

@media (min-width: 640px) {
    .wax-seal {
        top: 90px;
        width: 44px;
        height: 44px;
    }
}

.wax-seal .seal-text {
    font-size: 13px;
    font-weight: 800;
    color: #463007;
}

/* STANJE OTVORENE KOVERTE */
.envelope-wrapper.open {
    pointer-events: none;
}

.envelope-wrapper.open .envelope-flap {
    transform: rotateX(180deg);
    z-index: 2;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.envelope-wrapper.open .wax-seal {
    opacity: 0;
    transform: translateX(-50%) scale(0.6);
}

/* Pismo se izvlači prema gore – bez presecanja na manjim ekranima */
.envelope-wrapper.open .letter {
    transform: translateY(-115px);
    z-index: 25;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.35);
}

@media (min-width: 640px) {
    .envelope-wrapper.open .letter {
        transform: translateY(-135px);
    }
}
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(245, 240, 230, 0.6);
    border-radius: 8px;
}

::-webkit-scrollbar-thumb {
    background: rgba(180, 140, 90, 0.45);
    border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(180, 140, 90, 0.8);
}

@media print {
    body * {
        visibility: hidden;
    }
    #printablePlaque, #printablePlaque * {
        visibility: visible;
    }
    #printablePlaque {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background-color: #fffaf0 !important;
        color: #1c1917 !important;
        box-shadow: none !important;
        border: 2px solid #b48c5a !important;
        padding: 40px !important;
        z-index: 9999;
    }
}