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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.morse-trainer-container {
    max-width: 800px;
    width: 100%;
    background: #ffffff;
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.mode-selector {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.mode-btn {
    padding: 12px 24px;
    background:#0167b1;
    border: 0px solid transparent;
    border-radius: 25px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.mode-btn.active {
    background:#d6e13d;
    border-color: #00afda;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.mode-btn:hover {
    background: #d6e13d;
    transform: translateY(-2px);
}

.training-area {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.question {
    font-size: 3em;
    margin-bottom: 20px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.morse-display {
    font-size: 2.5em;
    font-family: 'Courier New', monospace;
    letter-spacing: 5px;
    color: #00ff88;
}

#answer-input {
    width: 80%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1.2em;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    margin-top: 20px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
}

#answer-input::placeholder {
    color: #999;
}

.feedback {
    margin-top: 15px;
    font-size: 1.2em;
    font-weight: bold;
}

.feedback.correct {
    color: #00ff88;
}

.feedback.incorrect {
    color: #ff5555;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.control-btn {
    padding: 10px 20px;
    font-size: 1em;
    background: #0167b1;
    color: #cccccc;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.control-btn:hover {
    background: #00e67a;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.play-audio-btn {
    background: #55aaff;
    color: white;
}

.play-audio-btn:hover {
    background: #4499ee;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 1.1em;
    margin-bottom: 20px;
}

.morse-chart {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s ease;
}

.morse-chart.show {
    opacity: 1;
    max-height: 500px;
    margin-top: 20px;
}

.morse-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.morse-char {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 5px;
}

.morse-code {
    font-family: 'Courier New', monospace;
    font-size: 1.1em;
    letter-spacing: 2px;
}

.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo {
    max-width: 150px;
    border-radius: 50%;
    border: 0px solid #fff;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
}