* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #121212;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    text-align: center;
    max-width: 100%;
    width: 500px;
}

h1 {
    margin-bottom: 20px;
    font-size: 2rem;
}

h2 {
    margin: 25px 0 15px;
    font-size: 1.5rem;
    color: #00BFFF;
}

h3 {
    margin: 10px 0;
    font-size: 1.2rem;
    color: #00BFFF;
}

.speed-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 200px;
    margin: 0 auto;
    border-radius: 50%;
    background-color: #222;
    border: 10px solid #333;
    box-shadow: 0 0 20px rgba(0, 100, 255, 0.5);
}

#speed {
    font-size: 4rem;
    font-weight: bold;
    color: #00BFFF;
}

.unit {
    font-size: 1.2rem;
    color: #888;
}

#status {
    margin-top: 15px;
    color: #888;
    font-size: 0.9rem;
}

.hp-analyzer {
    margin-top: 30px;
    background-color: #222;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

.form-group {
    margin: 15px 0;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #ccc;
    font-size: 0.9rem;
}

input {
    width: 100%;
    padding: 10px;
    background-color: #333;
    border: none;
    border-radius: 5px;
    color: white;
    font-size: 1rem;
}

.button-container {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    gap: 10px;
}

.action-button {
    flex: 1;
    padding: 12px;
    background-color: #0066CC;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.action-button:hover {
    background-color: #0055AA;
}

.action-button:disabled {
    background-color: #555;
    cursor: not-allowed;
}

.result-display {
    margin-top: 20px;
    font-size: 1.5rem;
    font-weight: bold;
    color: #00BFFF;
}

.status-text {
    margin-top: 10px;
    color: #888;
    font-size: 0.9rem;
}

.test-mode-btn {
    margin-top: 15px;
    padding: 8px 16px;
    background-color: #444;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.test-mode-btn:hover {
    background-color: #555;
}

.charts-container {
    margin-top: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.chart-box {
    background-color: #1a1a1a;
    border-radius: 5px;
    padding: 15px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

canvas {
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    border-radius: 5px;
}

.rpm-display {
    margin-top: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #FFCC00;
}

.chart-tooltip {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    pointer-events: none;
    z-index: 1000;
    font-size: 12px;
}

@media (max-width: 600px) {
    body {
        padding: 15px;
    }
    
    .speed-display {
        width: 180px;
        height: 180px;
    }
    
    #speed {
        font-size: 3.5rem;
    }
    
    .button-container {
        flex-direction: column;
    }
    
    .charts-container {
        grid-template-columns: 1fr;
    }
}