.elementor-1644 .elementor-element.elementor-element-67377cf{--display:flex;--min-height:0px;--align-items:center;--container-widget-width:calc( ( 1 - var( --container-widget-flex-grow ) ) * 100% );}/* Start custom CSS for html, class: .elementor-element-faac862 */:root {
    --primary: #4CAF50;
    --primary-hover: #45a049;
    --bg: #eef2f5;
    --card-bg: #ffffff;
    --text-main: #333;
    --border: #dcdcdc;
    --error: #d32f2f;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Segoe UI', Tahoma, sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Container Alignment - Fixed width for perfect edge-to-edge alignment */
.container {
    background: var(--card-bg);
    width: 100%;
    max-width: 800px; /* Optimized width for perfect reading and alignment */
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
}

.step {
    display: none;
    width: 100%;
    animation: fadeIn 0.4s ease-in-out;
}

.step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

h1, h2 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--primary);
    width: 100%;
    font-size: 32px;
}

/* Form Elements Alignment - Now perfectly matches width of text area */
.form-group {
    width: 100%;
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    text-align: left;
}

input[type="text"], select {
    width: 100%;
    height: 52px; 
    padding: 10px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 18px;
    outline: none;
    transition: all 0.3s ease;
    background-color: #ffffff; 
}

input[type="text"]:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.2);
}

button {
    width: 100%;
    padding: 16px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
    margin-top: 10px;
    display: block;
}

button:hover {
    background-color: var(--primary-hover);
}
button:active {
    transform: scale(0.98);
}

.danger-btn {
    background-color: var(--error);
    margin-top: 25px;
}

.danger-btn:hover {
    background-color: #b71c1c;
}

.restart-btn {
    margin-top: 25px;
}

/* Header & Timer */
.header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    padding: 15px 25px;
    background: #e8f5e9;
    border-radius: 10px;
    width: 100%;
    color: #2e7d32;
}

.timer {
    background: var(--primary);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
}

/* Dynamic Word Display Box */
#text-display {
    width: 100%;
    height: 160px;
    padding: 20px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: #fafafa;
    overflow-y: hidden;
    margin-bottom: 20px;
    font-size: 24px;
    line-height: 1.8;
    user-select: none;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 8px;
}

/* Individual Words */
#text-display span {
    padding: 2px 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.active-word {
    background: #e0e0e0;
    color: #000;
    border-bottom: 3px solid var(--primary);
}

.correct-word { color: #388e3c; }
.incorrect-word { color: var(--error); text-decoration: line-through; }

/* Single Line Input Area */
#text-input {
    width: 100%;
    height: 60px;
    font-size: 24px;
    text-align: center;
    border: 3px solid var(--border);
    border-radius: 10px;
}

#text-input:focus {
    border-color: var(--primary);
}

.error-bg {
    background-color: #ffebee !important;
    border-color: var(--error) !important;
    color: var(--error);
}

/* Leaderboard Stats */
.result-stats {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
}

.stat-box {
    flex: 1;
    text-align: center;
    background: #f8f9fa;
    padding: 30px 20px;
    border-radius: 12px;
    border: 1px solid #eee;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.stat-box p {
    font-size: 18px;
    color: #777;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-box h3 {
    font-size: 42px;
    color: var(--primary);
    margin: 0;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto; 
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 16px;
    white-space: nowrap; 
}

th, td {
    padding: 16px;
    text-align: left; /* Changed to left align for better table readability */
    border-bottom: 1px solid var(--border);
}

th {
    background-color: var(--primary);
    color: white;
    font-weight: 600;
}

/* ========================================================= */
/* MEDIA QUERIES FOR RESPONSIVE DESIGN (TABLET & MOBILE)     */
/* ========================================================= */

@media (max-width: 768px) {
    .container {
        padding: 30px 20px;
    }
    h1 {
        font-size: 28px;
    }
    .header-info {
        font-size: 18px;
        padding: 12px 15px;
    }
    #text-display {
        font-size: 20px;
        height: 140px;
        padding: 15px;
    }
    #text-input {
        font-size: 20px;
        height: 55px;
    }
    .result-stats {
        gap: 10px;
    }
    .stat-box {
        padding: 20px 10px;
    }
    .stat-box h3 {
        font-size: 32px;
    }
    .stat-box p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    .container {
        padding: 20px 15px;
        border-radius: 12px;
    }
    h1 {
        font-size: 24px;
    }
    h2 {
        font-size: 22px;
    }
    .header-info {
        flex-direction: column; 
        gap: 10px;
        text-align: center;
        font-size: 16px;
    }
    #text-display {
        font-size: 18px;
        height: 120px;
        padding: 12px;
        gap: 6px;
    }
    #text-input {
        font-size: 18px;
        height: 50px;
    }
    input[type="text"], select {
        height: 48px;
        font-size: 16px;
    }
    button {
        font-size: 16px;
        padding: 14px;
    }
    .result-stats {
        flex-direction: column; 
    }
    .stat-box {
        width: 100%;
        padding: 20px 15px;
    }
}/* End custom CSS */