* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #333;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 900px;
    overflow: hidden;
}

header {
    background: #2c3e50;
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.8;
}

.main-content {
    padding: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

.test-section {
    grid-column: 1 / -1;
}

.stats-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.stat {
    text-align: center;
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
}

.stat-label {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.quote-display {
    background: #ecf0f1;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 1.4rem;
    line-height: 1.6;
    min-height: 180px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.input-area {
    width: 100%;
    position: relative;
}

textarea {
    width: 100%;
    height: 150px;
    padding: 15px;
    border: 2px solid #bdc3c7;
    border-radius: 10px;
    font-size: 1.2rem;
    resize: none;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #3498db;
}

.controls {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

button {
    padding: 12px 25px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-start {
    background: #2ecc71;
    color: white;
}

.btn-start:hover {
    background: #27ae60;
}

.btn-stop {
    background: #e74c3c;
    color: white;
}

.btn-stop:hover {
    background: #c0392b;
}

.btn-reset {
    background: #3498db;
    color: white;
}

.btn-reset:hover {
    background: #2980b9;
}

.settings {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.settings h2 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.setting-group {
    margin-bottom: 15px;
}

.setting-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.setting-group select {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #bdc3c7;
}

.history {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.history h2 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.history-list {
    max-height: 200px;
    overflow-y: auto;
}

.history-item {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
}

.history-item:last-child {
    border-bottom: none;
}

.result {
    grid-column: 1 / -1;
    background: #2c3e50;
    color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    margin-top: 20px;
    display: none;
}

.result h2 {
    margin-bottom: 20px;
    font-size: 2rem;
}

.result-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
}

.result-stat {
    text-align: center;
}

.result-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #3498db;
}

.result-label {
    font-size: 1.2rem;
}

.character {
    display: inline-block;
    transition: all 0.2s;
}

.correct {
    color: #27ae60;
}

.incorrect {
    color: #e74c3c;
    text-decoration: underline;
}

.current {
    background-color: #3498db;
    color: white;
    padding: 0 2px;
    border-radius: 2px;
}

.instructions {
    grid-column: 1 / -1;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.instructions h2 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.instructions ul {
    list-style-type: none;
}

.instructions li {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
}

.instructions i {
    color: #3498db;
    margin-right: 10px;
    margin-top: 4px;
}

footer {
    text-align: center;
    padding: 20px;
    background: #2c3e50;
    color: white;
}

.github-link {
    color: #3498db;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    margin-top: 10px;
}

.github-link:hover {
    text-decoration: underline;
}

.github-link i {
    margin-right: 5px;
}
