:root {
    --brand-navy: #001C38;
    --brand-pink: #FF4081;
    --soft-white: #FAFAFA;
    --text-muted: rgba(0, 28, 56, 0.6);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.08);
    --radius-lg: 32px;
    --radius-md: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--soft-white);
    color: var(--brand-navy);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

#app {
    width: 100%;
    max-width: 500px;
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    margin-bottom: 40px;
}

.brand {
    font-weight: 800;
    font-size: 32px;
    letter-spacing: -1px;
    color: var(--brand-navy);
}

#main-content {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.state-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.hidden {
    display: none !important;
}

.title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.photo-card {
    width: fit-content;
    max-width: 100%;
    background: white;
    padding: 12px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    margin-bottom: 32px;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

#result-photo {
    max-width: 100%;
    max-height: 65vh;
    width: auto;
    height: auto;
    border-radius: 16px;
    display: block;
    object-fit: contain;
}

.actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.btn {
    width: 100%;
    height: 64px;
    border-radius: 32px;
    border: none;
    font-family: inherit;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--brand-navy);
    color: white;
    box-shadow: 0 8px 15px rgba(0, 28, 56, 0.2);
}

.btn-secondary {
    background-color: var(--brand-pink);
    color: white;
    box-shadow: 0 8px 15px rgba(255, 64, 129, 0.2);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--brand-navy);
    color: var(--brand-navy);
}

.expiry-info {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.footer-msg {
    font-size: 14px;
    font-weight: 600;
    color: var(--brand-navy);
}

/* Spinner */
.spinner {
    width: 48px;
    height: 48px;
    border: 5px solid rgba(0, 28, 56, 0.1);
    border-top: 5px solid var(--brand-navy);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

#error-message {
    margin-bottom: 32px;
    color: var(--text-muted);
}
