* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    color: #2c3e50;
    font-size: 28px;
    font-weight: 300;
    margin-bottom: 10px;
}

.header p {
    color: #7f8c8d;
    font-size: 14px;
}

.slider-section {
    margin-bottom: 40px;
}

.slider-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.slider-container {
    position: relative;
    margin: 30px 0;
}

.slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #27ae60, #f39c12, #e74c3c);
    outline: none;
    opacity: 0.8;
    transition: opacity 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: white;
    border: 3px solid #3498db;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.slider::-webkit-slider-thumb:active {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.slider::-moz-range-thumb {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: white;
    border: 3px solid #3498db;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 14px;
    color: #7f8c8d;
}

.slider-value {
    text-align: center;
    margin-top: 15px;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    background: #ecf0f1;
    padding: 10px;
    border-radius: 10px;
}

.summary-section {
    margin-top: 30px;
    margin-bottom: 30px;
}

.summary-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    border: 2px solid #e9ecef;
}

.summary-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.summary-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.summary-label {
    font-size: 12px;
    color: #7f8c8d;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-value {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    font-family: 'Courier New', monospace;
}

.actions-section {
    margin-top: 40px;
}

.actions-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.action-btn {
    background: linear-gradient(145deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 18px 20px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: block;
    text-align: center;
}

.action-btn.phone-btn {
    background: linear-gradient(145deg, #27ae60, #229954);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.action-btn:active {
    background: linear-gradient(145deg, #2980b9, #21618c);
    transform: scale(0.95);
}

.action-btn.clicked {
    background: linear-gradient(145deg, #27ae60, #229954);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
}

.action-btn.emergency {
    background: linear-gradient(145deg, #e74c3c, #c0392b);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.action-btn.emergency:active {
    background: linear-gradient(145deg, #c0392b, #a93226);
    transform: scale(0.95);
}

.action-btn.emergency.clicked {
    background: linear-gradient(145deg, #27ae60, #229954);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
}

.action-btn.warning {
    background: linear-gradient(145deg, #f39c12, #e67e22);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.action-btn.warning:active {
    background: linear-gradient(145deg, #e67e22, #d35400);
    transform: scale(0.95);
}

.action-btn.warning.clicked {
    background: linear-gradient(145deg, #27ae60, #229954);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
}

.events-section {
    margin-top: 30px;
}

.events-title {
    text-align: center;
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 15px;
    font-weight: 600;
}

.events-list {
    max-height: 300px;
    overflow-y: auto;
    border-radius: 10px;
    background: #f8f9fa;
    padding: 10px;
}

.event-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 5px;
    background: white;
    border-radius: 8px;
    font-size: 13px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.event-item:last-child {
    margin-bottom: 0;
}

.event-item.contraction-active {
    background: linear-gradient(135deg, #ffeaea, #ffe0e0);
    border-left: 3px solid #e74c3c;
}

.event-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.event-time {
    font-weight: 600;
    color: #2c3e50;
    font-size: 12px;
}

.event-message {
    color: #7f8c8d;
    font-size: 11px;
    margin-top: 2px;
}

.event-intensity {
    color: #e74c3c;
    font-weight: 600;
    font-size: 11px;
}

.event-duration {
    color: #8e44ad;
    font-weight: 600;
    font-size: 11px;
    margin-top: 2px;
}

.delete-btn {
    background: #e74c3c;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-left: 10px;
}

.delete-btn:active {
    background: #c0392b;
    transform: scale(0.9);
}

@media (max-width: 480px) {
    .container {
        margin: 10px;
        padding: 20px;
        border-radius: 15px;
    }

    .header h1 {
        font-size: 24px;
    }

    .slider-title, .actions-title, .summary-title {
        font-size: 18px;
    }

    .summary-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 15px;
    }

    .summary-item {
        padding: 12px;
    }

    .summary-value {
        font-size: 18px;
    }

    .action-btn {
        padding: 16px 18px;
        font-size: 15px;
    }
}

/* Login Form Styles */
.login-section {
    margin-top: 40px;
}

.login-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    border: 2px solid #e9ecef;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background: white;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.login-btn {
    width: 100%;
    background: linear-gradient(145deg, #27ae60, #229954);
    color: white;
    border: none;
    padding: 18px 20px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.login-btn:hover {
    background: linear-gradient(145deg, #229954, #1e7e4a);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.error-message {
    background: linear-gradient(135deg, #ffe6e6, #ffcccc);
    border: 2px solid #e74c3c;
    color: #c0392b;
    padding: 15px;
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
}

.login-info {
    text-align: center;
    color: #7f8c8d;
    font-size: 14px;
    line-height: 1.6;
}

.login-info p {
    margin-bottom: 10px;
}

.login-hint {
    background: linear-gradient(135deg, #e8f5e8, #d4f1d4);
    border: 1px solid #27ae60;
    border-radius: 8px;
    padding: 10px;
    font-weight: 600;
    color: #27ae60;
    font-family: 'Courier New', monospace;
}

/* Touch-friendly improvements */
@media (pointer: coarse) {
    .slider::-webkit-slider-thumb {
        width: 35px;
        height: 35px;
    }

    .action-btn {
        min-height: 50px;
        padding: 20px;
    }

    .form-input {
        padding: 18px;
        font-size: 18px;
    }

    .login-btn {
        padding: 20px;
        font-size: 18px;
    }
} 