/* Base Styles & Resets */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bread-crust: #8B4513;     /* Brown */
    --bread-soft: #F5DEB3;      /* Wheat */
    --oven-fire: #FF4500;       /* Orange Red */
    --golden-yellow: #FFD700;   /* Gold */
    --dark-text: #3E2723;       /* Very dark brown */
    --light-bg: #FFF8DC;        /* Cornsilk */
}

body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--light-bg);
    color: var(--dark-text);
    overflow-x: hidden;
    position: relative;
    text-align: center;
}

h1, h2, h3, h4 {
    font-family: 'Fredoka', cursive;
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: repeating-linear-gradient(
        45deg,
        rgba(255, 215, 0, 0.1),
        rgba(255, 215, 0, 0.1) 10px,
        rgba(255, 69, 0, 0.1) 10px,
        rgba(255, 69, 0, 0.1) 20px
    );
    animation: slide-bg 10s linear infinite;
    opacity: 0.6;
}

@keyframes slide-bg {
    0% { background-position: 0 0; }
    100% { background-position: 100px 100px; }
}

/* Structure */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: linear-gradient(135deg, var(--oven-fire), var(--golden-yellow));
    padding: 40px 20px;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(139, 69, 19, 0.3);
    color: white;
    margin-bottom: 40px;
    border: 5px solid var(--bread-crust);
}

.bounce-title {
    font-size: 3.5rem;
    text-shadow: 3px 3px 0 var(--bread-crust);
    animation: bounce 2s infinite alternate ease-in-out;
}

.subtitle {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 10px;
}

/* Content Cards */
.info-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    border-left: 10px solid var(--golden-yellow);
    margin-bottom: 40px;
    font-size: 1.2rem;
    line-height: 1.6;
}

.form-container {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    border: 4px dashed var(--bread-crust);
    position: relative;
    overflow: hidden;
}

.form-container h2 {
    color: var(--oven-fire);
    margin-bottom: 20px;
    font-size: 2rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 25px;
    text-align: left;
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--dark-text);
    font-size: 1.1rem;
}

input, select {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    border: 2px solid var(--bread-soft);
    border-radius: 10px;
    font-family: 'Nunito', sans-serif;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--oven-fire);
    box-shadow: 0 0 10px rgba(255, 69, 0, 0.3);
    background-color: white;
}

/* Button */
.submit-btn {
    width: 100%;
    padding: 20px;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    background: linear-gradient(to right, #FF4500, #FF8C00);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 15px rgba(255, 69, 0, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: 'Fredoka', cursive;
    margin-top: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.submit-btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 25px rgba(255, 69, 0, 0.6);
    background: linear-gradient(to right, #FF8C00, #FF4500);
}

.submit-btn:active {
    transform: translateY(2px);
}

/* Modals & Overlays */
.overlay, .modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.overlay {
    background: rgba(255, 248, 220, 0.9);
    flex-direction: column;
}

.modal {
    background: rgba(0, 0, 0, 0.8);
}

.hidden {
    display: none !important;
}

/* Loading animation */
.spinner {
    font-size: 5rem;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-text {
    color: var(--oven-fire);
    font-size: 2rem;
    animation: pulse 1s infinite alternate;
}

/* Error Modal Content */
.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    text-align: center;
    border: 8px solid var(--oven-fire);
    box-shadow: 0 0 50px rgba(255, 69, 0, 0.5);
}

.error-title {
    color: var(--oven-fire);
    margin-bottom: 20px;
    font-size: 2.5rem;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.1);
}

.error-body p {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.download-btn {
    display: inline-block;
    margin: 20px 0;
    padding: 15px 30px;
    background: #4CAF50;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 10px;
    font-size: 1.3rem;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
    transition: transform 0.2s, background 0.2s;
}

.download-btn:hover {
    background: #45a049;
    transform: scale(1.05);
}

.close-btn {
    background: #ccc;
    color: #333;
    border: none;
    padding: 10px 20px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
}

.close-btn:hover {
    background: #bbb;
}

/* Animations */
@keyframes bounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-15px); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { opacity: 0.6; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1.05); }
}

.fade-in {
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-down {
    animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.shake-animation {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .bounce-title {
        font-size: 2.2rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .submit-btn {
        font-size: 1.2rem;
        padding: 15px;
    }
    
    .error-title {
        font-size: 1.8rem;
    }
    
    .download-btn {
        font-size: 1.1rem;
        padding: 12px 20px;
    }
}
