/* Mobile-first base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d1b1b 100%);
    color: #e0e0e0;
    min-height: 100vh;
    padding: 10px;
    font-size: 1.1rem;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 4vw;
}

header {
    text-align: center;
    margin-bottom: 20px;
    padding: 16px 0;
    background: rgba(139, 0, 0, 0.2);
    border-radius: 10px;
    border: 1px solid #8b0000;
}

h1 {
    color: #ff4444;
    font-size: 2rem;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.subtitle {
    color: #cccccc;
    font-size: 1rem;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    align-items: stretch;
}

.btn {
    padding: 18px 0;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(45deg, #8b0000, #ff4444);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(45deg, #ff4444, #ff6666);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 0, 0, 0.4);
}

.btn-secondary {
    background: linear-gradient(45deg, #333333, #555555);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(45deg, #555555, #777777);
    transform: translateY(-2px);
}

.operatives-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.operative-card {
    background: rgba(40, 40, 40, 0.9);
    border: 2px solid #8b0000;
    border-radius: 10px;
    padding: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.operative-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8b0000, #ff4444, #8b0000);
}

.operative-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 0, 0, 0.3);
}

.operative-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 8px;
}

.operative-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #ff4444;
    flex: 1;
    min-width: 0;
    padding: 6px 0;
}

.remove-operative {
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.remove-operative:hover {
    background: #ff6666;
    transform: scale(1.1);
}

.tank-display {
    text-align: center;
    margin: 16px 0;
    padding: 12px 0;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.tank-level {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.tank-level.empty {
    color: #666666;
}

.tank-level.half {
    color: #ffaa00;
    background: linear-gradient(180deg, #ffcc00 0%, #ffaa00 50%, #8b0000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.tank-level.full {
    color: #ff4444;
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

/* --- Blood Tank Liquid Animation --- */
.tank-visual {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 48px;
    margin: 10px 0;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    border: 2px solid #333;
    position: relative;
    overflow: hidden;
}

.tank-fill {
    width: 100%;
    position: absolute;
    left: 0;
    bottom: 0;
    transition: height 2s cubic-bezier(0.25, 0.46, 0.45, 0.94), background 1.2s ease-in-out;
    z-index: 1;
    /* Create rounded top edges for liquid effect */
    border-radius: 0 0 6px 6px;
}

.tank-fill.empty {
    background: linear-gradient(to top, #333333, #555555 60%, #444 100%);
    height: 0%;
    border-radius: 0 0 6px 6px;
}

.tank-fill.half {
    background: linear-gradient(180deg, #ffcc00 0%, #ffaa00 60%, #8b0000 100%);
    height: 50%;
    border-radius: 0 0 6px 6px;
    /* Add a subtle wavy top edge */
    box-shadow: 
        0 -2px 4px rgba(255, 204, 0, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tank-fill.full {
    background: linear-gradient(180deg, #ff4444 0%, #8b0000 80%, #4a0000 100%);
    height: 100%;
    border-radius: 6px;
    box-shadow: 
        0 0 16px 2px rgba(255, 68, 68, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Add a glass shine overlay */
.tank-visual::after {
    content: '';
    position: absolute;
    left: 10%;
    top: 0;
    width: 80%;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(120deg, rgba(255,255,255,0.18) 10%, rgba(255,255,255,0.04) 60%, transparent 100%);
    border-radius: 8px;
    z-index: 2;
}

/* Optional: Drip effect (hidden by default, shown via JS) */
.tank-drip {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}
.tank-drip.active {
    opacity: 1;
    animation: drip-bounce 0.7s cubic-bezier(0.4, 1.6, 0.4, 1);
}
@keyframes drip-bounce {
    0% { top: -16px; opacity: 0; }
    20% { opacity: 1; }
    60% { top: 32px; opacity: 1; }
    100% { top: 48px; opacity: 0; }
}

.tank-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 8px;
}

.tank-btn {
    padding: 14px 0;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 1.1rem;
    width: 48%;
}

.tank-btn.increase {
    background: linear-gradient(45deg, #006600, #00aa00);
    color: white;
}

.tank-btn.increase:hover:not(:disabled) {
    background: linear-gradient(45deg, #00aa00, #00cc00);
    transform: translateY(-2px);
}

.tank-btn.decrease {
    background: linear-gradient(45deg, #660000, #aa0000);
    color: white;
}

.tank-btn.decrease:hover:not(:disabled) {
    background: linear-gradient(45deg, #aa0000, #cc0000);
    transform: translateY(-2px);
}

.tank-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.rules-panel {
    background: rgba(40, 40, 40, 0.9);
    border: 1px solid #8b0000;
    border-radius: 10px;
    padding: 16px;
    margin-top: 24px;
    font-size: 1rem;
}

.rules-panel h3 {
    color: #ff4444;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.rules-panel ul {
    list-style: none;
    padding-left: 0;
}

.rules-panel li {
    padding: 7px 0 7px 22px;
    border-bottom: 1px solid rgba(139, 0, 0, 0.3);
    position: relative;
}

.rules-panel li::before {
    content: '🩸';
    position: absolute;
    left: 0;
    top: 7px;
}

.rules-panel li:last-child {
    border-bottom: none;
}

.reset-section {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    background: rgba(40, 40, 40, 0.9);
    border: 1px solid #8b0000;
    border-radius: 10px;
}

.btn-danger {
    background: linear-gradient(45deg, #8b0000, #cc0000);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.4);
}

.btn-danger:hover {
    background: linear-gradient(45deg, #cc0000, #ff4444);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 0, 0, 0.5);
}

.reset-warning {
    color: #cccccc;
    font-size: 0.9rem;
    margin-top: 10px;
    font-style: italic;
}

.empty-state {
    text-align: center;
    padding: 32px 0;
    background: rgba(40, 40, 40, 0.9);
    border: 2px dashed #8b0000;
    border-radius: 10px;
    color: #cccccc;
    font-size: 1rem;
}

.operative-name:focus {
    outline: 2px solid #ff4444;
    border-radius: 4px;
    padding: 2px 4px;
}

/* Tablet and up */
@media (min-width: 600px) {
    .container {
        max-width: 600px;
        padding: 0 2vw;
    }
    .operatives-grid {
        gap: 20px;
    }
    .btn, .tank-btn {
        font-size: 1.1rem;
    }
}

/* Desktop and up */
@media (min-width: 900px) {
    .container {
        max-width: 1200px;
    }
    .operatives-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 24px;
    }
    .controls {
        flex-direction: row;
        align-items: center;
        gap: 18px;
    }
    .btn {
        width: auto;
        min-width: 180px;
    }
    .tank-btn {
        width: 44%;
    }
    h1 {
        font-size: 2.5rem;
    }
    .rules-panel {
        font-size: 1.1rem;
    }
} 