:root {
    font-family: 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color-scheme: light;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top, #ffeaf6 0%, #fff8e8 35%, #e4f5ff 100%);
}

#app {
    min-height: 100vh;
}

/* Kopējais fons ar mākoņiem */
.nameday-bg {
    position: relative;
    min-height: 100dvh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(to right, #bd1766, #2438bd);
}

.nameday-bg::before {
    content: '';
    position: absolute;
    inset: 0;

    z-index: 0;
}

.cloud {
    position: absolute;
    background: #ffffff;
    border-radius: 999px;
    box-shadow:
            0 18px 40px rgba(0, 0, 0, 0.12),
            0 0 0 1px rgba(255, 255, 255, 0.8) inset;
    opacity: 0.9;
    z-index: 0;
    filter: blur(0.3px);
    display:none;
}

.cloud.cloud-left {
    width: 320px;
    height: 170px;
    left: -60px;
    top: 55%;
    animation: cloud-move 40s linear infinite;
}

.cloud.cloud-right {
    width: 280px;
    height: 150px;
    right: -50px;
    top: 25%;
    animation: cloud-move-reverse 34s linear infinite;
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: #ffffff;
    border-radius: 999px;
    box-shadow:
            0 16px 30px rgba(0, 0, 0, 0.1),
            0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

.cloud.cloud-left::before {
    width: 170px;
    height: 120px;
    top: -55px;
    left: 25px;
}
.cloud.cloud-left::after {
    width: 140px;
    height: 95px;
    top: -45px;
    right: 30px;
}

.cloud.cloud-right::before {
    width: 150px;
    height: 105px;
    top: -50px;
    left: 15px;
}
.cloud.cloud-right::after {
    width: 115px;
    height: 80px;
    top: -40px;
    right: 25px;
}

@keyframes cloud-move {
    0%   { transform: translate3d(0, 0, 0); }
    50%  { transform: translate3d(30px, -10px, 0); }
    100% { transform: translate3d(0, 0, 0); }
}

@keyframes cloud-move-reverse {
    0%   { transform: translate3d(0, 0, 0); }
    50%  { transform: translate3d(-30px, -8px, 0); }
    100% { transform: translate3d(0, 0, 0); }
}

/* Apsveikuma kartiņa */
.greeting-card {
    position: relative;
    max-width: 960px;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 38px;
    background:
            radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.85) 0, rgba(255, 255, 255, 0) 60%),
            radial-gradient(circle at 100% 100%, rgba(255, 255, 255, 0.75) 0, rgba(255, 255, 255, 0) 60%),
            linear-gradient(135deg, rgba(255,255,255,0.94) 0%, rgba(255,231,242,0.94) 40%, rgba(255,246,218,0.94) 100%);
    box-shadow:
            0 40px 80px rgba(0, 0, 0, 0.22),
            0 0 0 1px rgba(255, 255, 255, 0.9);
    padding: 32px 40px;
    display: flex;
    flex-direction: column;
    z-index: 1;
    overflow: hidden;
}

/* “Papīra tekstūra” kartiņai */
.greeting-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
            radial-gradient(circle at 10% 20%, rgba(255, 170, 210, 0.12) 0, transparent 55%),
            radial-gradient(circle at 90% 10%, rgba(255, 215, 140, 0.16) 0, transparent 52%),
            radial-gradient(circle at 20% 90%, rgba(174, 233, 255, 0.18) 0, transparent 55%);
    mix-blend-mode: lighten;
    opacity: 0.8;
    pointer-events: none;
}

.greeting-card::after {
    content: '';
    position: absolute;
    inset: 18px;
    border-radius: 30px;
    border: 1px dashed rgba(255, 182, 193, 0.7);
    pointer-events: none;
    opacity: 0.9;
}

.card-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1;
    gap: 28px;
}

.card-left,
.card-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-left-header {
    font-size: clamp(28px, 3vw, 36px);
    font-weight: 700;
    margin-bottom: 10px;
}

.card-left-subtitle {
    font-size: 14px;
    max-width: 320px;
    margin-bottom: 16px;
    color: #8a476b;
}

.card-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    font-size: 11px;
    color: #b54b7f;
    box-shadow: 0 6px 15px rgba(255, 140, 180, 0.4);
    margin-bottom: 14px;
}

.card-flowers {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    font-size: 20px;
}

.card-bottom-note {
    margin-top: 18px;
    font-size: 12px;
    color: #b07a96;
}

/* Logo zem piezīmes */
.card-bottom-logo {
    margin-top: 10px;
}
.card-bottom-logo img {
    max-width: 140px;
    height: auto;
    display: block;
    opacity: 0.95;
}

@media (max-width: 900px) {
    .card-bottom-logo img {
        margin-top: 8px;
        max-width: 120px;
    }
}

.card-divider {
    width: 1px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4), rgba(255, 153, 200, 0.3), rgba(255, 255, 255, 0.4));
    border-radius: 999px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.nameday-form-card {
    background: rgba(255, 255, 255, 0.93) !important;
    border-radius: 24px !important;
    box-shadow:
            0 18px 40px rgba(0, 0, 0, 0.14),
            0 0 0 1px rgba(255, 255, 255, 0.9);
}

.nameday-button {
    border-radius: 999px;
    text-transform: none;
    letter-spacing: 0.03em;
    font-weight: 600;
}

.nameday-tagline {
    font-size: 11px;
    color: #af7497;
    margin-top: 10px;
}

/* Rezultāta (stāstiņa) izvade pēc ģenerēšanas */
.story-output {
    white-space: pre-wrap; /* saglabā rindas pārneses */
    line-height: 1.6;
    font-size: 14px;
    color: #5b2c45;
    min-height: 72px; /* lai kartīte “nelec”, kamēr rakstās */
}

/* Lente augšpusē */
.card-ribbon {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 14px;
    border-radius: 999px;
    background: linear-gradient(to right, #ff8fb8, #ffc96f);
    color: #5d1033;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: 0 10px 25px rgba(255, 153, 200, 0.6);
    z-index: 2;
}

/* Mazs kalendāriņš apakšā */
.nameday-calendar {
    position: absolute;
    bottom: 18px;
    right: 32px;
    width: 130px;
    height: 78px;
    background: linear-gradient(to bottom, #ffffff, #ffe3ee);
    border-radius: 20px;
    box-shadow:
            0 12px 30px rgba(0, 0, 0, 0.16),
            0 0 0 1px rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 11px;
    color: #b2437c;
    z-index: 1;
}

.nameday-calendar::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 10px;
    right: 10px;
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(to right, #ff8fb8, #ffc96f);
}

.nameday-calendar span {
    position: relative;
    z-index: 1;
}

/* Kustīgās svētku ikonas */
.floating-icon {
    position: absolute;
    width: 64px;
    height: 64px;
    border-radius: 999px;
    background:
            radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.1)),
            radial-gradient(circle at 70% 70%, rgba(255, 162, 210, 0.4), transparent 60%);
    box-shadow: 0 12px 34px rgba(255, 140, 180, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
    animation: float-icon 16s linear infinite;
    opacity: 0;
}

.floating-icon::before {
    content: '🎉';
    font-size: 30px;
}

.floating-icon.balloon::before {
    content: '🎈';
}
.floating-icon.cake::before {
    content: '🎂';
}
.floating-icon.flower::before {
    content: '🌸';
}
.floating-icon.heart::before {
    content: '💖';
}

.floating-icon.icon-1 {
    left: 8%;
    top: 16%;
    animation-delay: 0s;
}
.floating-icon.icon-2 {
    left: 14%;
    bottom: 12%;
    animation-delay: 4s;
}
.floating-icon.icon-3 {
    right: 14%;
    top: 18%;
    animation-delay: 8s;
}
.floating-icon.icon-4 {
    right: 7%;
    bottom: 20%;
    animation-delay: 12s;
}
.floating-icon.icon-5 {
    left: 50%;
    bottom: 8%;
    animation-delay: 2s;
}

@keyframes float-icon {
    0% {
        transform: translate3d(0, 0, 0) scale(0.8);
        opacity: 0;
    }
    15% {
        opacity: 1;
    }
    60% {
        transform: translate3d(0, -160px, 0) scale(1.05);
        opacity: 1;
    }
    100% {
        transform: translate3d(0, -260px, 0) scale(1.08);
        opacity: 0;
    }
}

/* Responsīvais salikums */
@media (max-width: 900px) {
    .greeting-card {
        aspect-ratio: auto;
        padding: 26px 20px 30px;
    }
    .card-content {
        flex-direction: column;
    }
    .card-divider {
        height: 1px;
        width: 100%;
        margin: 14px 0;
    }
    .nameday-calendar {
        position: static;
        margin-top: 18px;
        align-self: flex-end;
    }
}

/* Uzlabojumi mazām ierīcēm (≤ 600px) */
@media (max-width: 600px) {
    .nameday-bg {
        padding: 16px 14px calc(16px + env(safe-area-inset-bottom, 0px));
    }

    .greeting-card {
        width: 100%;
        border-radius: 26px;
        padding: 18px 14px 20px;
        box-shadow: 0 22px 44px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.85);
    }

    .card-content {
        gap: 16px;
    }

    .card-left-subtitle {
        max-width: none;
        font-size: 15px;
        line-height: 1.5;
    }

    .story-output {
        font-size: 15px;
        line-height: 1.7;
    }

    /* Ievadlauki – lielāki skārienmērķi un bez iOS autofokusa palielinājuma */
    .nameday-form-card .v-field {
        min-height: 44px;
    }
    .nameday-form-card .v-field__input {
        min-height: 44px;
        padding-top: 10px;
        padding-bottom: 10px;
        font-size: 16px; /* ≥16px, lai iOS nepalielina zoom fokusā */
    }
    .nameday-form-card .v-label {
        font-size: 14px;
        line-height: 1.3;
    }
    .nameday-form-card .v-selection-control .v-label {
        white-space: normal; /* ļauj ķeksīša tekstam aplauzties */
    }

    /* Samazinām vizuālo troksni mobilajās */
    .floating-icon {
        opacity: 0.45;
        width: 54px;
        height: 54px;
        box-shadow: 0 10px 26px rgba(255, 140, 180, 0.5);
    }

    .cloud {
        opacity: 0.65;
        filter: blur(0.6px);
    }

    /* Rezultāta darbības – labāka plūsma mobilajās */
    .story-actions {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }
    .story-actions .v-btn {
        flex: 1 1 48%;
    }
}

/* Ļoti šauras ierīces (≤ 420px) – pogas vienā kolonnā un mazākas ikonas */
@media (max-width: 420px) {
    .story-actions {
        flex-direction: column;
    }
    .story-actions .v-btn {
        flex: 1 1 100%;
        width: 100%;
    }

    .floating-icon {
        width: 44px;
        height: 44px;
        opacity: 0.38;
    }
    /* Paslēpjam pāris ikonas, lai netraucē saturam ļoti šaurā skatā */
    .floating-icon.icon-1,
    .floating-icon.icon-3 {
        display: none;
    }

    .cloud.cloud-left { transform: scale(0.9); }
    .cloud.cloud-right { transform: scale(0.9); }
}

/* Drošības zona apakšā ierīcēm ar "notch" */
.nameday-bg::after {
    content: '';
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: env(safe-area-inset-bottom, 0px);
    background: transparent;
    pointer-events: none;
    z-index: 1;
}

/* Story actions – bāzes klase (fallback gadījumam, ja inline stils tiek noņemts) */
.story-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
