:root {
    --primary-orange: #FF4500;
    --dark-orange: #FF8C00;
    --light-orange: #FFA07A;
    --background: #FFF5F0;
    --text-dark: #333333;
    --text-light: #FFFFFF;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --dark-primary: #000000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--primary-orange), var(--dark-orange));
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 600px;
}

.screen {
    display: none;
    animation: fadeIn 0.5s ease;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Welcome Screen Styles */
#welcome-screen {
    text-align: center;
    color: var(--text-light);
}

.logo-container {
    margin-bottom: 30px;
}

.animated-logo {
    width: 150px;
    height: 150px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.welcome-message h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.law-text {
    font-size: 1.2rem;
    margin-bottom: 30px;
    font-weight: 500;
}

.copyright {
    margin-top: 40px;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Form Styles */
.form-container {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    min-height: 400px; 
}

/* NEW: Logo Fix for Form Header */
.form-header {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin-bottom: 20px;
    text-align: center;
}

.form-header img.form-logo { 
    width: 80px; 
    height: 80px;
    margin-bottom: 10px;
}

.form-header h2 {
    font-size: 1.8rem;
    color: var(--primary-orange);
}
/* END NEW */

/* FIX: Only show form-section when it has the .active class. */
.form-section {
    display: none; 
    animation: fadeIn 0.5s ease;
    flex-grow: 1; 
    flex-direction: column; 
}

.form-section.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-group {
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(10px);
    animation: slideIn 0.5s forwards;
}

/* New: Container to push navigation to the bottom */
.form-buttons-container {
    margin-top: auto;
    padding-top: 20px;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.8);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 69, 0, 0.2);
}

.form-control:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: #666;
}

.email-note {
    color: var(--primary-orange);
    font-weight: 500;
}

/* Modified Law Message Styles for Glass Effect and Formal Text */
.law-message {
    background: linear-gradient(135deg, var(--primary-orange), var(--dark-orange));
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
    background: rgba(255, 69, 0, 0.7);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.law-message .law-header {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.law-message .law-description {
    margin: 5px 0 0;
    font-size: 0.85rem;
    font-weight: 400;
    opacity: 0.9;
}

/* Button Styles */
.btn-primary, .btn-secondary {
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Start Button Specific Styles (Dark with Glare) */
.start-button-glare {
    background: var(--dark-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.start-button-glare:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.start-button-glare::after {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: rgba(255, 255, 255, 0.4);
    transform: skewX(-20deg);
    transition: all 0.7s ease;
}

.start-button-glare:hover::after {
    left: 125%;
}

/* Original Primary Button Styles (for Next/Submit) */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-orange), var(--dark-orange));
    color: white;
    box-shadow: 0 4px 15px rgba(255, 69, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 69, 0, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.8);
    color: var(--primary-orange);
    border: 2px solid var(--primary-orange);
}

.btn-secondary:hover {
    background: rgba(255, 69, 0, 0.1);
}

.form-buttons {
    display: flex;
    justify-content: space-between;
}

/* Success Screen Styles */
#success-screen {
    text-align: center;
}

.success-container {
    max-width: 500px;
    margin: 0 auto;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-orange), var(--dark-orange));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 20px;
}

.success-message {
    margin: 20px 0;
    font-size: 1.1rem;
    line-height: 1.6;
}

.reference-number {
    background: rgba(255, 69, 0, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin: 25px 0;
}

.reference-number p {
    margin-bottom: 10px;
    font-weight: 500;
}

#ref-number {
    color: var(--primary-orange);
    font-size: 1.8rem;
}

.success-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.success-buttons .btn-primary,
.success-buttons .btn-secondary {
    flex: 1;
    max-width: 200px;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .glass {
        padding: 20px;
    }
    
    .welcome-message h1 {
        font-size: 2rem;
    }
    
    .form-header h2 {
        font-size: 1.5rem;
    }
    
    .form-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
    }
    
    .success-buttons {
        flex-direction: column;
    }
    
    .success-buttons .btn-primary,
    .success-buttons .btn-secondary {
        max-width: 100%;
    }
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.field-error {
    color: red;
    font-size: 0.85rem;
    margin-top: 5px;
}

.hidden {
    display: none !important;
}

/* Review Section Styles */
.review-summary {
    max-height: 300px;
    overflow-y: auto;
}

.review-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.review-item:last-child {
    border-bottom: none;
}

.review-label {
    font-weight: 500;
    color: var(--text-dark);
}

.review-value {
    color: #666;
    text-align: right;
}

.review-section {
    margin-bottom: 20px;
}

.review-section h4 {
    color: var(--primary-orange);
    margin-bottom: 10px;
    border-bottom: 2px solid var(--light-orange);
    padding-bottom: 5px;
}