:root {
    --panel-height: 190px;
    --panel-padding: 10px;
    --qr-size: 170px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header */
header {
    background: #FFD000;
    padding: 30px 20px;
    text-align: center;
    border-bottom: none;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.header-logo {
    height: 60px;
    width: auto;
    display: flex;
    flex-shrink: 0;
}

.header-text {
    flex: 1;
    text-align: left;
}

header h1 {
    font-size: 2.2rem;
    color: #000000;
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

header p {
    font-size: 1rem;
    color: #000000;
    font-weight: 500;
}

/* Main 3-Step Container */
.steps-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    padding: 40px;
    background: linear-gradient(180deg, #ffffff 0%, #f9f9f9 100%);
}

/* Step Cards */
.step-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
}

.step-card.step-active {
    border-color: #C23003;
    box-shadow: 0 4px 12px rgba(194, 48, 3, 0.2);
}

.step-card.step-completed {
    border-color: #C23003;
    box-shadow: 0 4px 12px rgba(194, 48, 3, 0.2);
}

.step-card.step-completed .step-header h3::before {
    content: "✓ ";
    color: #C23003;
    font-weight: bold;
    margin-right: 5px;
}

.step-card[data-step-locked="true"] {
    opacity: 0.6;
    pointer-events: none;
}

.step-locked-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.step-locked-overlay p {
    color: #6b7280;
    font-weight: 600;
    text-align: center;
    font-size: 0.95rem;
}

.step-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

/* Step Headers */
.step-header {
    margin-bottom: 25px;
}

.step-header h3 {
    font-size: 1.1rem;
    color: #1f2937;
    margin-bottom: 5px;
    font-weight: 600;
}

.step-header .step-subtitle {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
}

.step-header p {
    margin: 0;
}

/* Step Content */
.step-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.step-content > p {
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* Links in steps */
.link {
    color: #C23003;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
}

.link:hover {
    color: #000000;
    text-decoration: none;
}

/* Card Icon */
.card-icon {
    width: 120px;
    height: 80px;
    margin: 15px 0;
    opacity: 0.8;
}

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

.card-icon img {
    width: 120%;
    height: 120%;
    object-fit: contain;
    display: block;
}

/* Step 2 QR Container */
.qr-container {
    display: none;
    justify-content: center;
    align-items: center;
    padding: var(--panel-padding);
    background: #f9fafb;
    border-radius: 8px;
    margin: 10px 0;
    height: var(--panel-height);
}

.qr-container.active {
    display: flex;
}

#qrCode {
    display: flex;
    justify-content: center;
    width: var(--qr-size);
    height: var(--qr-size);
}

#qrCode img,
#qrCode canvas {
    max-width: var(--qr-size);
    max-height: var(--qr-size);
}

/* Loading Spinner */
.loading-container {
    display: none;
    text-align: center;
    padding: 30px;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    height: var(--panel-height);
    justify-content: center;
}

.loading-container.active {
    display: flex;
}

.spinner {
    border: 4px solid #e5e7eb;
    border-top: 4px solid #C23003;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-container p {
    color: #6b7280;
    font-size: 0.95rem;
}

/* Action Container */
.action-container {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

/* Success Content */
.success-badge {
    font-size: 3rem;
    color: #22c55e;
    text-align: center;
    margin-bottom: 15px;
    font-weight: bold;
}

.success-text {
    color: #22c55e;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 15px;
}

/* Error Content */
.error-badge {
    font-size: 3rem;
    color: #dc2626;
    text-align: center;
    margin-bottom: 15px;
    font-weight: bold;
}

.error-text {
    color: #dc2626;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 15px;
}

#step2ErrorMessage {
    color: #6b7280;
    text-align: center;
    font-size: 0.95rem;
}

#step2ErrorContent {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: var(--panel-height);
    padding: var(--panel-padding);
}

#step2ErrorContent.hidden {
    display: none;
}

#welcomeText {
    color: #6b7280;
    text-align: center;
    font-size: 0.95rem;
}

/* Buttons */
.btn-primary {
    background: #C23003;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-primary:hover {
    background: #9a2402;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(194, 48, 3, 0.4);
}

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

.btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary:disabled:hover {
    background: #9ca3af;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: #FFD000;
    color: #000000;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-secondary:hover {
    background: #E6B800;
}

/* Error Banner */
.error-banner {
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 40px 40px;
    display: none;
}

.error-banner.active {
    display: block;
}

.error-banner p {
    color: #991b1b;
    margin-bottom: 15px;
    font-weight: 500;
}

.error-banner button {
    width: 100%;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .steps-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-text {
        text-align: center;
    }
    
    .header-logo {
        height: 50px;
    }
}

@media (max-width: 768px) {
    .steps-container {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 15px;
    }
    
    header {
        padding: 30px 20px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .step-card {
        padding: 20px 15px;
    }
    
    .step-header h3 {
        font-size: 1rem;
    }
}

