:root {
    --primary: #d32f2f; /* Peruvian Red */
    --primary-light: #ff6659;
    --primary-dark: #9a0007;
    --secondary: #fbc02d; /* Sun Gold */
    --secondary-dark: #c89000;
    --text-main: #2c3e50;
    --text-muted: #546e7a;
    --text-light: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.92);
    --border-radius: 20px;
    --border-radius-sm: 12px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Background Setup */
.page-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #1a1a2e;
    background-size: cover;
    background-position: center;
    z-index: -2;
}

.page-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 100%);
    z-index: -1;
}

/* Layout */
.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px 40px;
    display: flex;
    flex-direction: column;
    flex: 1;
    z-index: 1;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.2;
}

.header {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 40px;
    text-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.eyebrow {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    border: 1px solid rgba(255,255,255,0.2);
}

.header h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    letter-spacing: -0.5px;
}

/* Cards */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    text-align: center;
    margin-bottom: 30px;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.card h2 {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 16px;
}

.card p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 14px 32px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--text-light);
    box-shadow: 0 8px 20px rgba(211, 47, 47, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(211, 47, 47, 0.5);
}

.btn-secondary {
    background: var(--text-main);
    color: var(--text-light);
}

.btn-secondary:hover:not(:disabled) {
    background: #1a252f;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: rgba(211, 47, 47, 0.1);
}

.btn-large {
    font-size: 1.25rem;
    padding: 16px 40px;
}

.btn-full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Quiz Interface */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
    margin-bottom: 12px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    width: 0%;
    transition: width 0.5s ease;
}

.question-counter {
    font-size: 0.9rem !important;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 24px !important;
}

.question-content {
    margin-bottom: 32px;
}

.question-image {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.question-text {
    font-size: 1.75rem !important;
    color: var(--text-main) !important;
}

.answers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 600px) {
    .answers-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.answer-btn {
    background: #fff;
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: var(--border-radius-sm);
    padding: 16px 20px;
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.answer-btn:hover {
    border-color: var(--primary);
    background: rgba(211, 47, 47, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.05);
}

.answer-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

/* Forms */
.form {
    text-align: left;
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    font-family: inherit;
    font-size: 1rem;
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: var(--border-radius-sm);
    background: #fff;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(211, 47, 47, 0.1);
}

/* Results */
.result-header {
    margin-bottom: 30px;
}

.result-eyebrow {
    font-family: 'Montserrat', sans-serif;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 8px;
}

.result-title {
    font-size: 2.5rem !important;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
}

.result-image {
    width: 100%;
    max-height: 350px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    margin-bottom: 24px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.result-description {
    font-size: 1.15rem !important;
    color: var(--text-main) !important;
    max-width: 600px;
    margin: 0 auto 30px !important;
}

/* Share Panel */
.share-panel {
    background: rgba(251, 192, 45, 0.15);
    border: 1px solid rgba(251, 192, 45, 0.3);
    border-radius: var(--border-radius-sm);
    padding: 24px;
    margin-top: 30px;
    margin-bottom: 30px;
}

.share-panel h3 {
    color: var(--secondary-dark);
    margin-bottom: 12px;
}

.share-panel p {
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.share-controls {
    display: flex;
    gap: 10px;
}

.share-controls input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    background: #fff;
    color: var(--text-muted);
}

/* Utilities */
.hidden {
    display: none !important;
}

.error-msg {
    background: #ffebee;
    color: #c62828;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    border-left: 4px solid #c62828;
}

#wbx-powered-by-slot {
    margin-top: auto;
    padding-top: 20px;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .card {
        padding: 30px 20px;
    }
    .share-controls {
        flex-direction: column;
    }
    .btn {
        width: 100%;
    }
}