/* ========================================
   GRADUATION ANNOUNCEMENT - STYLESHEET
   Elegant School Theme
   ======================================== */

/* === CSS Variables === */
:root {
    --navy-900: #0a1628;
    --navy-800: #0f2140;
    --navy-700: #142d57;
    --navy-600: #1a3a6e;
    --navy-500: #1e4d8f;
    --gold-400: #f0c75e;
    --gold-500: #d4a843;
    --gold-600: #c49a38;
    --gold-300: #f5d98a;
    --white: #ffffff;
    --white-90: rgba(255, 255, 255, 0.9);
    --white-70: rgba(255, 255, 255, 0.7);
    --white-50: rgba(255, 255, 255, 0.5);
    --white-20: rgba(255, 255, 255, 0.2);
    --white-10: rgba(255, 255, 255, 0.1);
    --white-05: rgba(255, 255, 255, 0.05);
    --green-500: #22c55e;
    --green-400: #4ade80;
    --green-bg: rgba(34, 197, 94, 0.1);
    --red-500: #ef4444;
    --red-400: #f87171;
    --red-bg: rgba(239, 68, 68, 0.1);
    --shadow-lg: 0 25px 60px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 35px 80px rgba(0, 0, 0, 0.4);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--navy-900);
    color: var(--white);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* === Particle Canvas === */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* === Confetti Canvas === */
#confettiCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* === Main Wrapper === */
.main-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
}

/* === Header === */
.header {
    width: 100%;
    max-width: 800px;
    text-align: center;
    padding: 50px 20px 30px;
    position: relative;
    animation: fadeInDown 1s ease-out;
}

.header-decoration {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold-400), transparent);
    border-radius: 2px;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* === School Emblem === */
.school-emblem {
    margin-bottom: 8px;
}

.emblem-ring {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 2px solid var(--gold-400);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: emblemGlow 3s ease-in-out infinite;
}

.emblem-ring::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px solid var(--gold-400);
    opacity: 0.3;
}

.emblem-inner {
    width: 66px;
    height: 66px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
}

.emblem-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(240, 199, 94, 0.3));
}

@keyframes emblemGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(240, 199, 94, 0.1); }
    50% { box-shadow: 0 0 35px rgba(240, 199, 94, 0.25); }
}

.header-school-name {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.1rem, 3.5vw, 1.4rem);
    font-weight: 700;
    color: var(--gold-300);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* === Loading Overlay === */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: var(--navy-900);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    transition: opacity 0.5s ease;
}

.loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--white-10);
    border-top-color: var(--gold-400);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    font-size: 0.9rem;
    color: var(--white-50);
    letter-spacing: 1px;
}

.loading-error {
    color: var(--red-400);
    font-size: 0.85rem;
    text-align: center;
    max-width: 300px;
    line-height: 1.6;
}

.header-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gold-400);
    opacity: 0.9;
}

.header-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 6vw, 3.2rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
}

.header-year {
    font-size: 1rem;
    color: var(--white-70);
    font-weight: 400;
}

.header-year span {
    color: var(--gold-300);
    font-weight: 600;
}

.header-line {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-400), transparent);
    margin-top: 4px;
}

/* === Cards (shared) === */
.card {
    background: linear-gradient(145deg, rgba(20, 45, 87, 0.6), rgba(15, 33, 64, 0.8));
    border: 1px solid var(--white-10);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: var(--transition);
}

.card:hover {
    border-color: var(--white-20);
    transform: translateY(-2px);
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(240, 199, 94, 0.03), transparent 60%);
    pointer-events: none;
}

/* === Countdown Section === */
.countdown-section {
    width: 100%;
    max-width: 580px;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.countdown-card {
    text-align: center;
    padding: 48px 32px;
}

.countdown-icon {
    font-size: 48px;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.countdown-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white-90);
    margin-bottom: 28px;
}

.countdown-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 70px;
}

.countdown-number {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--gold-400);
    line-height: 1;
    text-shadow: 0 0 20px rgba(240, 199, 94, 0.3);
    background: linear-gradient(145deg, rgba(240, 199, 94, 0.1), transparent);
    border: 1px solid rgba(240, 199, 94, 0.15);
    border-radius: var(--radius-md);
    padding: 12px 8px;
    min-width: 70px;
    transition: all 0.3s ease;
}

.countdown-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--white-50);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.countdown-separator {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold-400);
    opacity: 0.5;
    padding-bottom: 22px;
    animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.1; }
}

.countdown-date {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gold-300);
    margin-bottom: 12px;
}

.countdown-info {
    font-size: 0.85rem;
    color: var(--white-50);
    line-height: 1.6;
    max-width: 380px;
    margin: 0 auto;
}

/* === Upload Section (legacy) === */
.upload-section {
    width: 100%;
    max-width: 580px;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.upload-card {
    text-align: center;
}

.upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    color: var(--gold-400);
    opacity: 0.8;
}

.upload-icon svg {
    width: 100%;
    height: 100%;
}

.upload-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--white-90);
}

.upload-desc {
    font-size: 0.9rem;
    color: var(--white-50);
    line-height: 1.7;
    margin-bottom: 28px;
}

.upload-desc strong {
    color: var(--gold-300);
    font-weight: 600;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
    color: var(--navy-900);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(212, 168, 67, 0.3);
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(212, 168, 67, 0.4);
    background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
}

.upload-status {
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--green-400);
    min-height: 20px;
    transition: var(--transition);
}

.upload-status.error {
    color: var(--red-400);
}

/* === Search Section === */
.search-section {
    width: 100%;
    max-width: 580px;
    animation: fadeInUp 0.8s ease-out;
}

.data-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: var(--radius-md);
    color: var(--green-400);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 24px;
}

.data-info span {
    font-weight: 700;
}

.search-card {
    text-align: center;
}

.search-icon-wrapper {
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-icon-bg {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(240, 199, 94, 0.15), rgba(240, 199, 94, 0.05));
    animation: pulseRing 2.5s ease-in-out infinite;
}

@keyframes pulseRing {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

.search-icon-svg {
    width: 32px;
    height: 32px;
    color: var(--gold-400);
    position: relative;
    z-index: 1;
}

.search-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--white-90);
}

.search-desc {
    font-size: 0.9rem;
    color: var(--white-50);
    line-height: 1.6;
    margin-bottom: 32px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* === Input Group === */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 400px;
    margin: 0 auto;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid var(--white-20);
    border-radius: var(--radius-md);
    color: var(--white);
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-align: center;
    transition: var(--transition);
    outline: none;
}

.input-wrapper input::placeholder {
    color: var(--white-50);
    letter-spacing: 0.5px;
    font-weight: 400;
}

.input-wrapper input:focus {
    border-color: var(--gold-400);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(240, 199, 94, 0.1);
}

.input-border {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gold-400);
    transition: width 0.4s ease;
    border-radius: 2px;
}

.input-wrapper input:focus ~ .input-border {
    width: 60%;
}

.check-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
    color: var(--navy-900);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(212, 168, 67, 0.3);
    position: relative;
    overflow: hidden;
}

.check-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.check-btn:hover::before {
    left: 100%;
}

.check-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(212, 168, 67, 0.4);
}

.check-btn:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.check-btn:hover .btn-icon {
    transform: translateX(4px);
}

.search-hint {
    margin-top: 12px;
    font-size: 0.78rem;
    color: var(--white-50);
    opacity: 0.6;
}

/* === Suspense Overlay === */
.suspense-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 40, 0.97);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.5s ease;
}

.suspense-content {
    text-align: center;
    padding: 40px;
}

.suspense-spinner {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    position: relative;
}

.spinner-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
}

.spinner-ring:nth-child(1) {
    border-top-color: var(--gold-400);
    animation: spin 1s linear infinite;
}

.spinner-ring:nth-child(2) {
    inset: 8px;
    border-right-color: var(--gold-300);
    animation: spin 1.5s linear infinite reverse;
}

.spinner-ring:nth-child(3) {
    inset: 16px;
    border-bottom-color: var(--white-50);
    animation: spin 2s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.suspense-text {
    font-size: 1rem;
    color: var(--white-70);
    margin-bottom: 30px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 500;
}

.suspense-status {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    perspective: 600px;
}

.flip-text {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    font-weight: 800;
    transition: all 0.1s ease;
    display: inline-block;
}

.flip-text.lulus {
    color: var(--green-400);
    text-shadow: 0 0 30px rgba(34, 197, 94, 0.4);
}

.flip-text.tidak-lulus {
    color: var(--red-400);
    text-shadow: 0 0 30px rgba(239, 68, 68, 0.4);
}

.flip-text.flipping {
    animation: flipCard 0.15s ease-in-out;
}

@keyframes flipCard {
    0% { transform: rotateX(0) scale(1); opacity: 1; }
    50% { transform: rotateX(90deg) scale(0.8); opacity: 0; }
    100% { transform: rotateX(0) scale(1); opacity: 1; }
}

.suspense-progress {
    width: 280px;
    height: 3px;
    background: var(--white-10);
    border-radius: 3px;
    margin: 0 auto;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--gold-400), var(--gold-300));
    border-radius: 3px;
    transition: width 0.1s linear;
}

/* === Result Section === */
.result-section {
    width: 100%;
    max-width: 580px;
}

.result-content {
    animation: fadeInUp 0.8s ease-out;
}

.result-card {
    text-align: center;
    padding: 56px 40px;
}

.result-card.lulus {
    border-color: rgba(34, 197, 94, 0.3);
    background: linear-gradient(145deg, rgba(20, 60, 40, 0.5), rgba(15, 33, 64, 0.8));
}

.result-card.tidak-lulus {
    border-color: rgba(239, 68, 68, 0.2);
    background: linear-gradient(145deg, rgba(60, 20, 20, 0.4), rgba(15, 33, 64, 0.8));
}

.result-badge {
    width: 100px;
    height: 100px;
    margin: 0 auto 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.result-card.lulus .result-badge {
    background: radial-gradient(circle, rgba(34, 197, 94, 0.15), transparent);
    border: 2px solid rgba(34, 197, 94, 0.3);
    animation: successPulse 2s ease-in-out infinite;
}

.result-card.tidak-lulus .result-badge {
    background: radial-gradient(circle, rgba(239, 68, 68, 0.1), transparent);
    border: 2px solid rgba(239, 68, 68, 0.2);
}

@keyframes successPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.2); }
    50% { box-shadow: 0 0 0 15px rgba(34, 197, 94, 0); }
}

.badge-icon {
    font-size: 44px;
    line-height: 1;
}

.result-status {
    margin-bottom: 28px;
}

.result-status h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.result-card.lulus .result-status h2 {
    color: var(--green-400);
    text-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

.result-card.tidak-lulus .result-status h2 {
    color: var(--red-400);
}

.result-status p {
    font-size: 0.9rem;
    color: var(--white-50);
}

.result-details {
    background: var(--white-05);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 32px;
    border: 1px solid var(--white-10);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.detail-row:not(:last-child) {
    border-bottom: 1px solid var(--white-05);
}

.detail-label {
    font-size: 0.85rem;
    color: var(--white-50);
    font-weight: 400;
}

.detail-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--white-90);
}

/* === SKL Download Button === */
.skl-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    margin-top: 20px;
    margin-bottom: 28px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: var(--white);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.3);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.skl-download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.skl-download-btn:hover::before {
    left: 100%;
}

.skl-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(34, 197, 94, 0.4);
    background: linear-gradient(135deg, #4ade80, #22c55e);
}

.skl-download-btn:active {
    transform: translateY(0);
}

/* === Not Found === */
.notfound-section {
    width: 100%;
    max-width: 580px;
    animation: fadeInUp 0.8s ease-out;
}

.notfound-card {
    text-align: center;
    padding: 56px 40px;
    border-color: rgba(239, 68, 68, 0.15);
}

.notfound-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    color: var(--red-400);
    opacity: 0.7;
}

.notfound-icon svg {
    width: 100%;
    height: 100%;
}

.notfound-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--red-400);
    margin-bottom: 10px;
}

.notfound-desc {
    font-size: 0.9rem;
    color: var(--white-50);
    line-height: 1.6;
    margin-bottom: 28px;
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
}

/* === Back Button === */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: transparent;
    border: 1.5px solid var(--white-20);
    border-radius: var(--radius-md);
    color: var(--white-70);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.back-btn:hover {
    border-color: var(--gold-400);
    color: var(--gold-400);
    background: rgba(240, 199, 94, 0.05);
}

/* === Footer === */
.footer {
    width: 100%;
    text-align: center;
    padding: 40px 20px 30px;
    margin-top: auto;
}

.footer p {
    font-size: 0.8rem;
    color: var(--white-50);
    opacity: 0.5;
}

/* === Animations === */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* === Responsive === */
@media (max-width: 640px) {
    .card {
        padding: 36px 24px;
        border-radius: var(--radius-lg);
    }

    .header {
        padding: 40px 16px 24px;
    }

    .header-title {
        font-size: 1.8rem;
    }

    .emblem-ring {
        width: 72px;
        height: 72px;
    }

    .emblem-inner {
        width: 48px;
        height: 48px;
    }

    .emblem-img {
        width: 36px;
        height: 36px;
    }

    .countdown-number {
        font-size: 2rem;
        min-width: 56px;
        padding: 10px 6px;
    }

    .countdown-separator {
        font-size: 1.5rem;
    }

    .countdown-title {
        font-size: 1.1rem;
    }

    .search-title {
        font-size: 1.3rem;
    }

    .flip-text {
        font-size: 2rem;
    }

    .result-badge {
        width: 80px;
        height: 80px;
    }

    .badge-icon {
        font-size: 36px;
    }

    .result-status h2 {
        font-size: 1.6rem;
    }

    .detail-row {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }
}

@media (max-width: 380px) {
    .card {
        padding: 28px 18px;
    }

    .input-group {
        gap: 10px;
    }
}

/* === Shake animation for invalid input === */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-6px); }
    20%, 40%, 60%, 80% { transform: translateX(6px); }
}

.shake {
    animation: shake 0.6s ease-in-out;
}

/* === Heartbeat for final reveal === */
@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.15); }
    28% { transform: scale(1); }
    42% { transform: scale(1.15); }
    70% { transform: scale(1); }
}

.heartbeat {
    animation: heartbeat 1s ease-in-out;
}

/* === Screen flash === */
.screen-flash {
    position: fixed;
    inset: 0;
    background: white;
    z-index: 10000;
    animation: flash 0.6s ease-out forwards;
    pointer-events: none;
}

@keyframes flash {
    0% { opacity: 0.7; }
    100% { opacity: 0; }
}
