/* =========================================
   GOOGLE FONTS & VARIABLEN
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-hover: rgba(255, 255, 255, 0.25);
    --accent-red: #ff4757;
    --accent-blue: #54a0ff;
    --success-green: #2ed573;
    --text-color: #ffffff;
    --bg-gradient: radial-gradient(circle at top left, #1e3799, #0c2461);
}

/* =========================================
   BASIS LAYOUT
   ========================================= */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background: var(--bg-gradient);
    background-attachment: fixed;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
    overflow: hidden; /* Verhindert Scrollen auf Tablets/Smartphones */
}

.content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 20px;
}

/* =========================================
   GLASS CONTAINER (ALLGEMEIN)
   ========================================= */
.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    padding: 40px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    text-align: center;
    width: 90%;
    max-width: 600px;
    transition: all 0.4s ease;
}

/* =========================================
   INDEX SEITE: SELECTION CARDS
   ========================================= */
.choice-container {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 900px;
}

.card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    width: 280px;
    text-decoration: none;
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-10px);
    background: var(--glass-hover);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 15px 45px rgba(0,0,0,0.4);
}

.card i {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: white;
}

.card h2 {
    margin: 10px 0;
    font-size: 1.6rem;
    font-weight: 600;
}

.card p {
    opacity: 0.7;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.badge {
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 700;
}

/* =========================================
   ELEMENTE: BUTTONS & STATUS
   ========================================= */
button {
    background: var(--accent-red);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 20px 40px;
    border-radius: 16px;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
}

button:active {
    transform: scale(0.96);
}

button:hover {
    filter: brightness(1.1);
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.5);
}

.status-indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--success-green);
    display: inline-block;
    margin-right: 10px;
    box-shadow: 0 0 10px var(--success-green);
}

/* =========================================
   ALARM ANIMATIONEN
   ========================================= */
.alarm-active {
    background: var(--accent-red) !important;
    box-shadow: 0 0 20px var(--accent-red);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* Klasse wird per JS dem Body hinzugefügt, wenn Alarm aktiv */
body.alarm-mode {
    background: radial-gradient(circle at center, #ff4757, #740000) !important;
    animation: flash 0.5s infinite alternate;
}

@keyframes flash {
    from { opacity: 1; }
    to { opacity: 0.9; }
}

/* =========================================
   RESPONSIVE ANPASSUNGEN
   ========================================= */

/* Tablet Optimierung (Sender) */
@media (min-width: 768px) and (max-width: 1024px) {
    .glass-container {
        width: 80%;
        max-width: 700px;
    }
}

/* Smartphone Optimierung (Receiver / Index) */
@media (max-width: 480px) {
    body {
        overflow-y: auto; /* Erlaubt vertikales Scrollen auf kleinen Handys */
        align-items: flex-start;
        padding-top: 40px;
    }
    
    .glass-container {
        padding: 25px;
        width: 90%;
    }

    .choice-container {
        flex-direction: column;
        align-items: center;
    }

    .card {
        width: 100%;
        max-width: 300px;
        padding: 30px;
    }

    .title-header h1 {
        font-size: 1.8rem;
    }
}

/* Header Text Styles */
.title-header {
    text-align: center;
    margin-bottom: 40px;
}

.title-header h1 {
    margin: 0;
    font-size: 2.2rem;
    font-weight: 700;
}

.title-header p {
    opacity: 0.6;
    margin-top: 5px;
}