/* ObraVera Air Gap Verifier — Brand Theme */

:root {
    --deep-charcoal: #1a1a1a;
    --dark-charcoal: #0f0f0f;
    --warm-gold: #c9a961;
    --light-gold: #d4b876;
    --dark-gold: #b8965a;
    --warm-white: #f5f5f5;
    --soft-gray: #666666;
    --success-green: #4a9c6d;
    --warning-amber: #d4a030;
    --error-red: #c45050;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--deep-charcoal);
    color: var(--warm-white);
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    -webkit-text-size-adjust: 100%;
}

/* Header */
.header {
    text-align: center;
    padding: 2rem 1rem 1rem;
    width: 100%;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--warm-gold);
    letter-spacing: 0.05em;
}

.header .subtitle {
    font-size: 0.85rem;
    color: var(--soft-gray);
    margin-top: 0.25rem;
}

/* Main container */
.container {
    width: 100%;
    max-width: 400px;
    padding: 0 1.5rem 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* Record button */
.record-btn {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--warm-gold);
    background: var(--dark-charcoal);
    color: var(--warm-gold);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    margin-top: 1rem;
}

.record-btn:active {
    transform: scale(0.95);
}

.record-btn.recording {
    border-color: var(--error-red);
    color: var(--error-red);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(196, 80, 80, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(196, 80, 80, 0); }
}

/* Timer */
.timer {
    font-size: 2rem;
    font-variant-numeric: tabular-nums;
    color: var(--warm-white);
    min-height: 2.5rem;
}

/* Warning banner */
.warning {
    background: rgba(212, 160, 48, 0.15);
    border: 1px solid var(--warning-amber);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    color: var(--warning-amber);
    text-align: center;
    width: 100%;
    display: none;
}

.warning.visible {
    display: block;
}

/* Submit button */
.submit-btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    background: var(--warm-gold);
    color: var(--deep-charcoal);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: none;
}

.submit-btn.visible {
    display: block;
}

.submit-btn:active {
    background: var(--dark-gold);
}

.submit-btn:disabled {
    background: var(--soft-gray);
    cursor: not-allowed;
}

/* Processing spinner */
.processing {
    text-align: center;
    display: none;
}

.processing.visible {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--soft-gray);
    border-top-color: var(--warm-gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Result card */
.result {
    width: 100%;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    display: none;
}

.result.visible {
    display: block;
}

.result.found {
    background: rgba(74, 156, 109, 0.12);
    border: 1px solid var(--success-green);
}

.result.not-found {
    background: rgba(102, 102, 102, 0.12);
    border: 1px solid var(--soft-gray);
}

.result .status-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.result .creator-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--warm-gold);
    margin-bottom: 0.25rem;
}

.result .work-title {
    font-size: 1rem;
    color: var(--warm-white);
    margin-bottom: 0.5rem;
}

.result .match-info {
    font-size: 0.8rem;
    color: var(--success-green);
    margin-bottom: 0.25rem;
}

.result .timestamp {
    font-size: 0.75rem;
    color: var(--soft-gray);
}

.result .not-found-msg {
    font-size: 1.1rem;
    color: var(--soft-gray);
}

/* Try again button */
.reset-btn {
    width: 100%;
    padding: 0.85rem;
    border: 2px solid var(--soft-gray);
    border-radius: 10px;
    background: transparent;
    color: var(--warm-white);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s;
    display: none;
}

.reset-btn.visible {
    display: block;
}

.reset-btn:active {
    border-color: var(--warm-gold);
}

/* Footer */
.footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.7rem;
    color: var(--soft-gray);
}

/* Error state */
.error-msg {
    background: rgba(196, 80, 80, 0.12);
    border: 1px solid var(--error-red);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: var(--error-red);
    text-align: center;
    width: 100%;
    display: none;
}

.error-msg.visible {
    display: block;
}
