/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --success-color: #4ade80;
    --warning-color: #fbbf24;
    --error-color: #f87171;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Background Animation */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.floating-key {
    position: absolute;
    font-size: 2rem;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.floating-key:nth-child(1) { top: 10%; left: 10%; animation-delay: 0s; }
.floating-key:nth-child(2) { top: 20%; right: 15%; animation-delay: 2s; }
.floating-key:nth-child(3) { top: 60%; left: 5%; animation-delay: 4s; }
.floating-key:nth-child(4) { top: 80%; right: 10%; animation-delay: 6s; }
.floating-key:nth-child(5) { top: 40%; left: 50%; animation-delay: 8s; }
.floating-key:nth-child(6) { top: 70%; right: 30%; animation-delay: 10s; }
.floating-key:nth-child(7) { top: 30%; left: 80%; animation-delay: 12s; }
.floating-key:nth-child(8) { top: 90%; left: 60%; animation-delay: 14s; }

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.1;
    }
    25% {
        transform: translateY(-20px) rotate(5deg);
        opacity: 0.15;
    }
    50% {
        transform: translateY(-40px) rotate(-5deg);
        opacity: 0.1;
    }
    75% {
        transform: translateY(-20px) rotate(3deg);
        opacity: 0.15;
    }
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.brand-icon {
    font-size: 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    gap: 1rem;
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-icon {
    font-size: 1.25rem;
}

/* Main Content */
.main-content {
    margin-top: 80px;
    position: relative;
    z-index: 1;
}

/* Hero Section */
.hero-section {
    padding: 4rem 2rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    margin: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: white;
    line-height: 1.2;
}

.text-gradient {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    justify-content: center;
}

/* Stats Section */
.stats-section {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.stat-icon {
    font-size: 3rem;
    opacity: 0.8;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Typing Area */
.typing-area {
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.test-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow-xl);
}

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

.test-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.test-instruction {
    color: var(--text-secondary);
    font-size: 1rem;
}

.text-display {
    background: var(--light-color);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    font-size: 1.25rem;
    line-height: 1.8;
    min-height: 120px;
    transition: border-color 0.3s ease;
    cursor: text;
}

.text-display:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.text-content {
    color: var(--text-primary);
}

.typing-input {
    width: 100%;
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 1.125rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 2rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.typing-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.test-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.difficulty-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.difficulty-selector label {
    font-weight: 600;
    color: var(--text-secondary);
}

.difficulty-selector select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: white;
    cursor: pointer;
}

/* Progress Section */
.progress-section {
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.progress-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.progress-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.progress-percentage {
    font-weight: 700;
    color: var(--primary-color);
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-md);
    width: 0%;
    transition: width 0.3s ease;
}

/* About Section */
.about-section {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    padding: 4rem 2rem;
    margin-top: 4rem;
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
}

.about-container h1 {
    font-size: 3rem;
    font-weight: 800;
    color: rgb(51, 51, 51);
    text-align: center;
    margin-bottom: 1rem;
}

.about-para {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
    line-height: 1.6;
}

/* Skills Section */
.skills-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    padding: 3rem;
    margin-top: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.section-number {
    font-size: 3rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.3);
    min-width: 60px;
}

.section-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.section-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
    border-radius: 1px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.1);
}

.skill-category h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-category h4::before {
    content: '📚';
    font-size: 1.5rem;
}

.skill-category:nth-child(2) h4::before {
    content: '🌐';
}

.skill-category:nth-child(3) h4::before {
    content: '🛠️';
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Success Section */
.success-section {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    padding: 4rem 2rem;
    margin-top: 4rem;
}

.success-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.success-branding {
    margin-bottom: 2rem;
}

.success-title {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.5rem;
}

.success-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.success-heading {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
}

.success-description {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 800px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.success-features {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-weight: 500;
}

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

/* About Section */

.about-section {
    
    background: linear-gradient(135deg, #ffffff, #ffffff);
    padding: 4rem 2rem;
    margin-top: 1.5rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 2rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.result-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--light-color);
    border-radius: var(--radius-lg);
}

.result-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.result-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
}

.modal-footer {
    padding: 1rem 2rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Text Highlighting Classes */
.text-content .correct {
    background-color: rgba(34, 197, 94, 0.25);
    color: #16a34a;
    border-radius: 3px;
    padding: 2px 1px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.text-content .incorrect {
    background-color: rgba(239, 68, 68, 0.25);
    color: #dc2626;
    border-radius: 3px;
    padding: 2px 1px;
    text-decoration: underline;
    text-decoration-color: #dc2626;
    animation: shake 0.3s ease;
    font-weight: 500;
}

.text-content .current {
    background-color: rgba(59, 130, 246, 0.3);
    color: #2563eb;
    border-radius: 3px;
    padding: 2px 1px;
    animation: pulse 1.2s ease-in-out infinite;
    font-weight: 600;
    position: relative;
}

.text-content .current::after {
    content: '';
    position: absolute;
    right: -2px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #2563eb;
    animation: blink 1s infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

@keyframes pulse {
    0%, 100% { 
        background-color: rgba(59, 130, 246, 0.3);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    50% { 
        background-color: rgba(59, 130, 246, 0.5);
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0);
    }
}

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

/* Enhanced Interactive Elements */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(0);
}

.stat-card {
    cursor: pointer;
    position: relative;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: var(--radius-lg);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover::before {
    opacity: 1;
}

.text-display {
    user-select: none;
    cursor: pointer;
    position: relative;
}

.text-display:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.text-display.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    animation: focusPulse 2s ease-in-out infinite;
}

@keyframes focusPulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(102, 126, 234, 0.1);
    }
}

.typing-input {
    transition: all 0.3s ease;
}

.typing-input:focus {
    transform: scale(1.01);
}

.typing-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.difficulty-selector select {
    transition: all 0.3s ease;
}

.difficulty-selector select:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.difficulty-selector select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.progress-fill {
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.modal {
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(4px);
}

.modal.show {
    animation: fadeIn 0.3s ease;
}

.modal-content {
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.modal.show .modal-content {
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

.modal-close {
    transition: all 0.2s ease;
    border-radius: 50%;
}

.modal-close:hover {
    background: var(--light-color);
    transform: rotate(90deg);
    color: var(--error-color);
}

.result-item {
    transition: all 0.3s ease;
    animation: fadeInScale 0.5s ease backwards;
}

.result-item:nth-child(1) { animation-delay: 0.1s; }
.result-item:nth-child(2) { animation-delay: 0.2s; }
.result-item:nth-child(3) { animation-delay: 0.3s; }
.result-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.result-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--primary-color);
}

.feature-item {
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Styling */
::selection {
    background: rgba(102, 126, 234, 0.3);
    color: var(--text-primary);
}

/* Loading Animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

/* Celebration Animation */
.celebration {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3000;
    pointer-events: none;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Text Highlighting Classes */
.correct {
    background-color: rgba(34, 197, 94, 0.2);
    color: #16a34a;
    border-radius: 2px;
}

.incorrect {
    background-color: rgba(239, 68, 68, 0.2);
    color: #dc2626;
    border-radius: 2px;
}

.current {
    background-color: rgba(59, 130, 246, 0.2);
    color: #2563eb;
    border-radius: 2px;
    animation: blink 1s infinite;
}

.text-display.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Animations */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.5; }
}

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

/* Confetti Animation */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 2px;
    animation: confettiFall 3s linear forwards;
    z-index: 9999;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Notification Toast */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    color: white;
    font-weight: 600;
    z-index: 3000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-xl);
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: linear-gradient(135deg, var(--success-color), #16a34a);
}

.notification.info {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 1rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .nav-actions {
        gap: 0.5rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .test-container {
        padding: 2rem;
    }
    
    .test-title {
        font-size: 1.5rem;
    }
    
    .text-display {
        font-size: 1.125rem;
        padding: 1.5rem;
    }
    
    .typing-input {
        font-size: 1rem;
        padding: 1rem;
    }
    
    .test-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    /* About Section Responsive */
    .about-container h1 {
        font-size: 2.5rem;
    }
    
    .about-para {
        font-size: 1rem;
        margin: 0 auto 2rem;
    }
    
    .skills-section {
        padding: 2rem;
        margin-top: 2rem;
    }
    
    .section-header {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .section-number {
        font-size: 2rem;
        min-width: auto;
    }
    
    .section-header h1 {
        font-size: 1.5rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .skill-category {
        padding: 1.5rem;
    }
    
    .skill-category h4 {
        font-size: 1.125rem;
        margin-bottom: 1rem;
    }
    
    .skill-tags {
        gap: 0.5rem;
    }
    
    .skill-tag {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
    .success-features {
        gap: 2rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .success-title {
        font-size: 2rem;
    }
    
    .success-heading {
        font-size: 1.5rem;
    }
    
    .success-features {
        flex-direction: column;
        gap: 1rem;
    }
}

.about-para{
    margin-bottom: 1rem;
    font-size: 1.125rem;
    color: var(--text-primary);
    line-height: 1.6;
    text-align: left;
}

.skills {
  background: linear-gradient(135deg, rgba(11, 105, 255, 0.02) 0%, transparent 100%);
  border-radius: 20px;
  padding: 3rem 2rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.skill-category h4 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.skill-tag {
  padding: 0.5rem 1rem;
  background: var(--card);
  color: var(--text);
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.skill-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--accent);
}
