:root {
    /* LIGHT AESTHETIC PALETTE */
    --bg-base: #f1f5f9;
    --bg-surface: rgba(255, 255, 255, 0.88);
    --bg-card-inner: rgba(248, 250, 252, 0.9);
    --border-subtle: rgba(226, 232, 240, 0.9);
    --border-strong: #cbd5e1;
    
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-subtle: #64748b;
    
    --accent-primary: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-surface: rgba(37, 99, 235, 0.08);

    --color-rain: #dc2626;
    --color-doubt: #d97706;
    --color-dry: #059669;

    --space-4: 4px;
    --space-8: 8px;
    --space-12: 12px;
    --space-16: 16px;
    --space-24: 24px;
    --space-32: 32px;

    --radius-sm: 10px;
    --radius-md: 20px;
    --radius-pill: 9999px;

    --shadow-card: 0 20px 40px -15px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.6);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
}

/* AESTHETIC LIGHT MESH GRADIENT */
body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-x: hidden;
    background: 
        radial-gradient(at 10% 10%, rgba(224, 231, 255, 0.8) 0px, transparent 50%),
        radial-gradient(at 90% 15%, rgba(254, 226, 226, 0.6) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(240, 249, 255, 0.9) 0px, transparent 60%),
        radial-gradient(at 85% 85%, rgba(238, 242, 255, 0.8) 0px, transparent 50%),
        radial-gradient(at 15% 90%, rgba(254, 243, 199, 0.5) 0px, transparent 50%),
        #f8fafc;
    background-attachment: fixed;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

.container {
    width: 100%;
    max-width: 580px;
    margin: 0 auto;
    padding: 0 var(--space-24);
}

/* HEADER NAADLOOS IN ACHTERGROND */
header {
    background: transparent;
    border-bottom: none;
    position: sticky;
    top: 0;
    z-index: 50;
    padding-top: env(safe-area-inset-top);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.brand {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--text-main);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.02em;
    touch-action: manipulation;
}

.btn-info {
    min-width: 44px;
    min-height: 44px;
    border-radius: var(--radius-pill);
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-strong);
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    touch-action: manipulation;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-info:hover, .btn-info:active {
    transform: rotate(15deg) scale(1.05);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

main {
    padding: var(--space-24) 0;
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.app-card {
    background-color: var(--bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-md);
    padding: var(--space-32);
    box-shadow: var(--shadow-card);
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    font-size: clamp(1.4rem, 4vw, 1.85rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-24);
    line-height: 1.2;
    color: var(--text-main);
}

/* MEME CONTAINER */
.cat-container {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 4 / 3;
    background-color: var(--bg-card-inner);
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: var(--space-24);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
}

.cat-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.2s ease;
}

.cat-image.loaded {
    opacity: 1;
}

.cat-container:hover .cat-image {
    transform: scale(1.03);
}

.cat-placeholder {
    position: absolute;
    color: var(--text-subtle);
    font-size: 2.5rem;
}

/* VERDICT TYPOGRAPHY & SHAKE */
.verdict {
    font-size: clamp(2.8rem, 10vw, 4.2rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: var(--space-8);
}

.shake {
    animation: shakeAnim 0.5s ease-in-out;
}

@keyframes shakeAnim {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px) rotate(-2deg); }
    40%, 80% { transform: translateX(6px) rotate(2deg); }
}

.verdict-sub {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: var(--space-24);
    max-width: 440px;
    line-height: 1.5;
    font-weight: 500;
}

/* METRICS GRID */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-12);
    width: 100%;
    margin-bottom: var(--space-24);
}

.metric-box {
    background-color: var(--bg-card-inner);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: var(--space-16) var(--space-12);
    text-align: center;
}

.metric-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-subtle);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.metric-value {
    font-size: clamp(1.25rem, 3.5vw, 1.5rem);
    font-weight: 800;
    color: var(--text-main);
    transition: color 0.3s ease;
}

/* STATUS ROW */
.status-row {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-size: 0.8125rem;
    color: var(--text-subtle);
    border-top: 1px solid var(--border-subtle);
    padding-top: var(--space-16);
}

.location-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--text-muted);
}

/* MODAL STYLING */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-16);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 100;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.2);
    width: 100%;
    max-width: 420px;
    padding: var(--space-24);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active .modal-card {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    font-size: 1.1rem;
    color: var(--text-subtle);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    touch-action: manipulation;
}

.modal-close:hover {
    color: var(--text-main);
    background: #e2e8f0;
}

.modal-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-surface);
    color: var(--accent-primary);
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: var(--space-12);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
    margin-bottom: var(--space-8);
}

.modal-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: var(--space-20);
}

/* PORTFOLIO BUTTON */
.portfolio-btn {
    width: 100%;
    background-color: var(--accent-primary);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    padding: var(--space-12) var(--space-16);
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.portfolio-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

/* DISCLAIMER BOX */
.disclaimer-box {
    margin-top: var(--space-16);
    padding: var(--space-12);
    background-color: var(--bg-card-inner);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-subtle);
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
}

.disclaimer-box i {
    font-size: 0.85rem;
    color: var(--text-subtle);
    margin-top: 2px;
    flex-shrink: 0;
}

/* FOOTER NAADLOOS IN ACHTERGROND */
footer {
    background: transparent;
    border-top: none;
    padding: var(--space-24) 0;
    padding-bottom: calc(var(--space-24) + env(safe-area-inset-bottom));
    font-size: 0.8125rem;
    color: var(--text-subtle);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-12);
}

@media (max-width: 600px) {
    .container { padding: 0 var(--space-16); }
    .app-card { padding: var(--space-24) var(--space-16); }
    .metrics-grid { gap: var(--space-8); }
    .metric-box { padding: var(--space-12) var(--space-8); }
    .footer-inner { flex-direction: column; text-align: center; gap: var(--space-8); }
}