:root {
    --ui-ink: #0f172a;
    --ui-muted: #475569;
    --ui-line: #e2e8f0;
    --ui-surface: rgba(255, 255, 255, 0.96);
    --ui-surface-soft: rgba(248, 250, 252, 0.96);
    --ui-shadow-card: 0 30px 110px rgba(15, 23, 42, 0.14), 0 2px 10px rgba(15, 23, 42, 0.05);
}

.noise-overlay {
    background-image:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.35) 0 1px, transparent 1px),
        radial-gradient(circle at 80% 30%, rgba(255,255,255,0.26) 0 1px, transparent 1px),
        radial-gradient(circle at 40% 70%, rgba(255,255,255,0.20) 0 1px, transparent 1px),
        repeating-linear-gradient(0deg, rgba(15,23,42,0.015) 0 1px, transparent 1px 4px);
    background-size: 140px 140px, 160px 160px, 180px 180px, 100% 100%;
    mix-blend-mode: soft-light;
}

.animate-fade-in { animation: fadeIn 0.42s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.toast-enter { animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.toast-leave { animation: toastSlideOut 0.28s ease-in forwards; }
@keyframes toastSlideIn {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes toastSlideOut {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(-100%); opacity: 0; }
}

.section-card {
    position: relative;
    overflow: hidden;
    border-radius: 2rem;
    border: 1px solid rgba(226, 232, 240, 0.82);
    background: var(--ui-surface);
    box-shadow: var(--ui-shadow-card);
    padding: 1.25rem;
}
@media (min-width: 768px) {
    .section-card { padding: 1.6rem; }
}

.pro-input {
    width: 100%;
    background: var(--ui-surface-soft);
    border: 1.5px solid var(--ui-line);
    border-radius: 1rem;
    padding: 0.95rem 1rem;
    color: var(--ui-ink);
    font-size: 0.94rem;
    font-weight: 700;
    outline: none;
    transition: all 0.22s ease;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02) inset;
    font-variant-numeric: tabular-nums;
}
@media (min-width: 768px) {
    .pro-input {
        padding: 1rem 1rem;
        font-size: 0.98rem;
    }
}
.pro-input:focus {
    background: #ffffff;
    border-color: #2D4B8C;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}
.pro-input[readonly] {
    background: #f1f5f9;
    color: #64748b;
    cursor: default;
}
.pro-input.border-red-500 {
    border-color: #ef4444 !important;
    background: #fef2f2;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08);
}

.otp-input {
    letter-spacing: 0.75em;
}

.tabular-numbers {
    font-variant-numeric: tabular-nums;
}

.option-card {
    padding: 0.78rem 0.5rem;
    text-align: center;
    border-radius: 1rem;
    font-weight: 800;
    transition: transform 0.16s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    will-change: transform;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.12);
}
@media (min-width: 768px) {
    .option-card {
        padding: 0.95rem 0.8rem;
    }
}
.option-card:active {
    transform: scale(0.98);
}
.peer:checked + .option-card {
    background: #2D4B8C;
    color: white !important;
    border-color: #2D4B8C !important;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.22);
    transform: translateY(-1px);
}
.peer:focus-visible + .option-card {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

#image-preview-container:empty {
    display: none;
}

.preview-card {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 1.25rem;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
    transform: translateZ(0);
}
.preview-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, filter 0.35s ease;
}
.preview-card:hover img {
    transform: scale(1.06);
    filter: blur(1px) saturate(1.05);
}
.preview-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.32), rgba(15, 23, 42, 0.02));
    opacity: 0;
    transition: opacity 0.22s ease, backdrop-filter 0.22s ease;
    backdrop-filter: blur(0px);
}
.preview-card:hover .preview-overlay {
    opacity: 1;
    backdrop-filter: blur(2px);
}
.preview-delete {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 9999px;
    background: rgba(239, 68, 68, 0.95);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.3rem;
    box-shadow: 0 12px 28px rgba(239, 68, 68, 0.26);
    opacity: 0;
    transform: scale(0.88);
    transition: opacity 0.22s ease, transform 0.22s ease, background 0.2s ease;
}
.preview-card:hover .preview-delete {
    opacity: 1;
    transform: scale(1);
}
.preview-delete:hover {
    background: #dc2626;
}
.preview-badge {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    right: 0.75rem;
    background: rgba(15, 23, 42, 0.84);
    color: white;
    font-size: 10px;
    font-weight: 800;
    text-align: center;
    padding: 0.4rem 0.6rem;
    border-radius: 9999px;
    backdrop-filter: blur(8px);
}

@keyframes popIn {
    0% { transform: scale(0.92); opacity: 0; }
    60% { transform: scale(1.03); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
.success-visible {
    animation: popIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
