/* =========================================
   Emergency AI Guidance - Main Stylesheet
   ========================================= */

/* --------------------------
   Global Reset & Variables
--------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --primary-red: #c62828;
    --dark-red: #8e0000;
    --light-red: #ff5f52;
    --calm-blue: #1565c0;
    --light-blue: #5e92f3;
    --white: #ffffff;
    --light-gray: #f5f5f5;
    --medium-gray: #757575;
    --dark-gray: #212121;
    --success-green: #2e7d32;
    --warning-orange: #f57c00;

    /* Effects */
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
}

/* --------------------------
   Body & App Container
--------------------------- */
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-gray);
    color: var(--dark-gray);
    line-height: 1.6;
    min-height: 100vh;
    max-width: 100vw;
    overflow-x: hidden;
}

.app-container {
    max-width: 800px;
    margin: 2rem auto;
    background-color: var(--white);
    min-height: 100vh;
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    position: relative;
    overflow-x: hidden;
    padding: 1.5rem;
}

/* --------------------------
   Utility Classes
--------------------------- */
.hidden { display: none !important; }
.text-center { text-align: center; }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-red);
    color: var(--white);
    border-radius: var(--border-radius);
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover {
    background-color: var(--dark-red);
    transform: scale(1.05);
}

/* --------------------------
   Animation Keyframes
--------------------------- */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes voicePulse {
    0%, 100% { height: 10px; }
    50% { height: 20px; }
}

@keyframes recording {
    0%, 100% { box-shadow: 0 0 0 0 rgba(198, 40, 40, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(198, 40, 40, 0); }
}

@keyframes shake {
    from { transform: translateX(-5px); }
    to { transform: translateX(5px); }
}

/* --------------------------
   Responsive Design
--------------------------- */
@media (max-width: 600px) {
    .app-container {
        padding: 1rem;
        margin: 1rem;
    }

    .home-title {
        font-size: 1.8rem;
    }

    .input-title, .severe-title {
        font-size: 1.6rem;
    }

    .home-features {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .feature {
        width: 140px;
        padding: 1rem;
    }

    .step-actions, .severe-actions {
        flex-direction: column;
        gap: 1rem;
    }
}

/* --------------------------
   Accessibility
--------------------------- */
@media (prefers-reduced-motion: reduce) {
    .emergency-icon, .severe-icon, .mic-button.active {
        animation: none !important;
    }
}

/* --------------------------
   High Contrast Mode
--------------------------- */
@media (prefers-contrast: high) {
    :root {
        --primary-red: #b00000;
        --calm-blue: #003c8f;
        --dark-gray: #000000;
    }

    .app-container {
        border: 2px solid #000;
    }
}
