:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --background: #0f172a;
    --surface: #1e293b;
    --surface-light: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --success: #22c55e;
    --error: #ef4444;
    --animation-speed: 0.3s;
    --gradient-start: #6366f1;
    --gradient-end: #8b5cf6;
}

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

body {
    background-color: var(--background);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.content-wrapper {
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.header {
    text-align: center;
    margin-bottom: 2.5rem;
}

/* Logo */
 .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}


.logo-image {
    width: 50px; 
    height: auto; 
    margin-right: 10px; /* Space between image and text */
}




h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.test-wrapper {
    background-color: var(--surface);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.center-screen {
    padding: 3rem 2rem;
}

.start-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.start-content h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.start-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.feature-icon {
    font-size: 1.2rem;
}

.progress-container {
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.2);
}

.progress-bar {
    height: 4px;
    background-color: var(--surface-light);
    border-radius: 2px;
    overflow: hidden;
}

#time-indicator {
    height: 100%;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    width: 100%;
    transition: width linear 1s;
}

.stats-bar {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem;
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat {
    text-align: center;
}

.stat-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.typing-area {
    padding: 2rem;
}

.word-display {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.3rem;
    line-height: 2rem;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    min-height: 150px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.word {
    display: inline-block;
    margin-right: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all var(--animation-speed) ease;
}

.highlight {
    background-color: rgba(99, 102, 241, 0.2);
    transform: scale(1.05);
}

.correct {
    color: var(--success);
    opacity: 0.7;
}

.incorrect {
    color: var(--error);
    background-color: rgba(239, 68, 68, 0.1);
}

.input-wrapper {
    position: relative;
}

.input-focus-border {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    transition: all var(--animation-speed) ease;
    transform: translateX(-50%);
}

#text-input {
    width: 100%;
    font-size: 1.2rem;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    transition: all var(--animation-speed) ease;
}

#text-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

#text-input:focus + .input-focus-border {
    width: 100%;
}

.result {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.result-content {
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.result h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.result-stat {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.primary-button {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--animation-speed) ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px rgba(99, 102, 241, 0.5);
}

.primary-button:active {
    transform: translateY(0);
}

.button-icon {
    font-size: 1.2rem;
}

.hidden {
    display: none !important;
}

.fade {
    opacity: 0;
    transition: opacity var(--animation-speed) ease;
}

.fade.show {
    opacity: 1;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp var(--animation-speed) ease;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 0.5s ease-in-out;
}

/* new code */
/* ... (keep existing CSS) ... */

.word-display {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.3rem;
    line-height: 2rem;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    min-height: 150px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.words-wrapper {
    position: relative;
    transition: transform 0.3s ease;
    white-space: nowrap;
}

.word {
    display: inline-block;
    margin-right: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all var(--animation-speed) ease;
    position: relative;
}

.word.active {
    background-color: rgba(99, 102, 241, 0.2);
    transform: scale(1.05);
}

.word.correct {
    color: var(--success);
    opacity: 0.7;
}

.word.incorrect {
    color: var(--error);
    background-color: rgba(239, 68, 68, 0.1);
}

.cursor {
    position: absolute;
    width: 2px;
    height: 24px;
    background-color: var(--primary-color);
    animation: blink 1s infinite;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}