:root {
            --primary: #4361ee;
            --primary-dark: #3a56d4;
            --secondary: #7209b7;
            --accent: #4cc9f0;
            --dark: #212529;
            --light: #c2daf1;
            --white: #e9ecf0;
            --gray: #6c757d;
            --success: #28a745;
            --danger: #dc3545;
            --warning: #ffc107;
            --border-radius: 12px;
            --shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
            --transition: all 0.3s ease;
            --font-main: 'Roboto', sans-serif;
            --font-mono: 'Source Code Pro', monospace;
        }

        

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        .main-container {
            font-family: var(--font-main);
            background-color: var(--light);
            color: var(--dark);
            line-height: 1.6;
            min-height: 100vh;
            transition: var(--transition);
        }

        .container {
            width: 95%;
            margin: 0 auto;
            padding: 20px;
        }

        /* Header styles */
        .header-title {
            text-align: center;
            padding: 40px 20px;
            position: relative;
            border-radius: 20px 20px;
            margin-bottom: 30px;
            background: linear-gradient(135deg, #9a6ccb 0%, #2575fc 100%);
            

        }

        h1 {
            font-size: 2.8rem;
            margin-bottom: 15px;
            background: linear-gradient(90deg, var(--primary), var(--secondary));
            -webkit-background-clip: text;
            background-clip: text;
            color: white;
            font-weight: 800;
        }

        .subtitle {
            font-size: 1.2rem;
            color: white;
            max-width: 700px;
            margin: 0 auto 30px;
        }


        /* Test mode selector */
        .mode-selector {
            display: flex;
            justify-content: center;
            margin-bottom: 30px;
            flex-wrap: wrap;
            gap: 10px;
        }

        .mode-btn {
            padding: 12px 20px;
            border-radius: var(--border-radius);
            border: none;
            background: rgba(0, 0, 0, 0.05);
            color: black;
            font-family: var(--font-main);
            font-weight: 500;
            cursor: pointer;
            transition: var(--transition);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .mode-btn.active {
            background: var(--primary);
            color: white;
        }

        .mode-btn:hover:not(.active) {
            background: rgba(0, 0, 0, 0.1);
        }

        /* Main test area */
        .test-container {
            display: grid;
            grid-template-columns: 1fr;
            gap: 30px;
            margin-bottom: 40px;
        }

        .test-controls {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 15px;
            margin-bottom: 20px;
        }

        .control-group {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .control-label {
            font-weight: 500;
            color: #3574f5;
        }

        select, button, input[type="file"] {
            padding: 10px 15px;
            border-radius: var(--border-radius);
            border: 1px solid rgba(0, 0, 0, 0.1);
            background-color: var(--white);
            color: var(--dark);
            font-family: var(--font-main);
            font-size: 1rem;
            transition: var(--transition);
            cursor: pointer;
        }

        select {
            min-width: 120px;
        }

        input[type="file"] {
            padding: 8px 12px;
            width: 100%;
        }

        select:focus, button:focus, textarea:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
        }

        .btn {
            background: var(--primary);
            color: white;
            border: none;
            padding: 12px 20px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .btn:hover {
            background: var(--primary-dark);
            transform: translateY(-2px);
            box-shadow: var(--shadow);
        }

        .btn-secondary {
            background: transparent;
            color: var(--primary);
            border: 1px solid var(--primary);
        }

        .btn-secondary:hover {
            background: rgba(67, 97, 238, 0.1);
        }

        .timer-display {
            font-size: 1.8rem;
            font-weight: 700;
            color: var(--primary);
            min-width: 100px;
            text-align: center;
        }

        .countdown {
            font-size: 3rem;
            font-weight: 700;
            color: var(--primary);
            text-align: center;
            margin: 20px 0;
            height: 60px;
        }

        /* Test text area */
        .test-area {
            background: var(--white);
            border-radius: var(--border-radius);
            box-shadow: var(--shadow);
            padding: 30px;
            transition: var(--transition);
        }

        .test-text {
            font-family: var(--font-mono);
            font-size: 1.4rem;
            line-height: 1.8;
            margin-bottom: 30px;
            color: var(--dark);
            position: relative;
        }

        .text-display {
            white-space: pre-wrap;
            word-wrap: break-word;
            padding: 20px;
            border-radius: var(--border-radius);
            background-color: rgba(0, 0, 0, 0.03);
            border: 1px solid rgba(0, 0, 0, 0.05);
            max-height: 300px;
            overflow-y: auto;
        }

        .custom-text-area {
            width: 100%;
            min-height: 150px;
            padding: 15px;
            font-family: var(--font-mono);
            font-size: 1.2rem;
            border: 2px solid rgba(0, 0, 0, 0.1);
            border-radius: var(--border-radius);
            resize: none;
            background: var(--light);
            color: black;
            margin-bottom: 15px;
        }

        .cursor {
            position: relative;
        }

        .cursor::after {
            content: '';
            position: absolute;
            left: 0;
            bottom: 0;
            width: 2px;
            height: 1.2em;
            background-color: var(--primary);
            animation: blink 1s infinite;
        }

        @keyframes blink {
            0%, 100% { opacity: 1; }
            50% { opacity: 0; }
        }

        .correct {
            color: var(--success);
        }

        .incorrect {
            color: var(--danger);
            text-decoration: underline;
        }

        .current {
            background-color: rgba(67, 97, 238, 0.1);
            border-radius: 2px;
        }

        /* Input area */
        .input-area {
            position: relative;
        }

        #typingInput, #freeTypingInput {
            width: 100%;
            padding: 15px;
            font-family: var(--font-mono);
            font-size: 1.2rem;
            border: 2px solid rgba(0, 0, 0, 0.1);
            border-radius: var(--border-radius);
            resize: none;
            background: #e2e4e7;
            color:black;
            caret-color: var(--dark);
            text-shadow: 0 0 0 var(--dark);
            transition: var(--transition);
        }

        #typingInput:focus, #freeTypingInput:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
        }

        /* File upload */
        .file-upload {
            margin-bottom: 20px;
        }

        .file-upload-info {
            font-size: 0.9rem;
            color: var(--gray);
            margin-top: 5px;
        }

        #customTypingInput{
            width:100%;
            height: 200px; 
        }

        /* Results section */
        .results {
            display: none;
            background: var(--white);
            border-radius: var(--border-radius);
            box-shadow: var(--shadow);
            padding: 30px;
            margin-top: 30px;
            transition: var(--transition);
            color: var(--dark)
        }

        .results.show {
            display: block;
            animation: fadeIn 0.5s ease;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .results-title {
            font-size: 1.8rem;
            margin-bottom: 20px;
            color: var(--primary);
            text-align: center;
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .stat-card {
            background: rgba(0, 0, 0, 0.03);
            border-radius: var(--border-radius);
            padding: 20px;
            text-align: center;
            transition: var(--transition);
        }

        .stat-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        }

        .stat-value {
            font-size: 2.5rem;
            font-weight: 700;
            color: var(--primary);
            margin-bottom: 5px;
        }

        .stat-label {
            font-size: 1rem;
            color: var(--gray);
        }

        .stat-wpm {
            grid-column: span 2;
        }

        .stat-wpm .stat-value {
            font-size: 3.5rem;
        }

        .stat-wpm .stat-label {
            font-size: 1.2rem;
        }

        .details-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
        }

        .detail-card {
            background: rgba(0, 0, 0, 0.03);
            border-radius: var(--border-radius);
            padding: 20px;
        }

        .detail-title {
            font-size: 1.2rem;
            margin-bottom: 15px;
            color: var(--primary);
            border-bottom: 1px solid rgba(0, 0, 0, 0.1);
            padding-bottom: 10px;
        }

        .detail-content {
            line-height: 1.8;
        }

        /* Progress chart */
        .progress-container {
            margin-top: 30px;
        }

        .progress-title {
            font-size: 1.2rem;
            margin-bottom: 15px;
            color: var(--primary);
        }

        .progress-bar {
            height: 10px;
            background: rgba(0, 0, 0, 0.1);
            border-radius: 5px;
            overflow: hidden;
            margin-bottom: 10px;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--primary), var(--secondary));
            border-radius: 5px;
            transition: width 0.5s ease;
        }

        .progress-labels {
            display: flex;
            justify-content: space-between;
            font-size: 0.9rem;
            color: var(--gray);
        }

        /* Comparison results */
        .comparison-result {
            margin-top: 20px;
            padding: 15px;
            border-radius: var(--border-radius);
            background: rgba(0, 0, 0, 0.03);
        }

        .comparison-title {
            font-weight: 600;
            margin-bottom: 10px;
            color: var(--primary);
        }

        /* Features section */
        .features {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 25px;
            margin: 40px 0;
        }

        .feature-card {
            background: var(--white);
            padding: 25px;
            border-radius: var(--border-radius);
            box-shadow: var(--shadow);
            transition: var(--transition);
        }

        .feature-card:hover {
            transform: translateY(-5px);
        }

        .feature-card i {
            font-size: 2.5rem;
            color: var(--primary);
            margin-bottom: 15px;
        }

        .feature-card h3 {
            margin-bottom: 10px;
            color: var(--dark);
        }

        

        /* Tabs */
        .tab-content {
            display: none;
        }

        .tab-content.active {
            display: block;
        }

        /* Responsive adjustments */
        @media (max-width: 768px) {
            h1 {
                font-size: 2.2rem;
            }

            .test-controls {
                flex-direction: column;
                align-items: flex-start;
            }

            .control-group {
                width: 100%;
                justify-content: space-between;
            }

            .stats-grid {
                grid-template-columns: 1fr 1fr;
            }

            .stat-wpm {
                grid-column: span 2;
            }

            .details-grid {
                grid-template-columns: 1fr;
            }

            .mode-selector {
                flex-direction: column;
                align-items: stretch;
            }
        }

        @media (max-width: 480px) {
            h1 {
                font-size: 1.8rem;
            }

            .test-text {
                font-size: 1.1rem;
            }

            .stats-grid {
                grid-template-columns: 1fr;
            }

            .stat-wpm {
                grid-column: span 1;
            }
        }


 /* ===== ARTICLE SPECIFIC STYLES - NO BODY STYLES ===== */
 #typing-guide-article {
      width: 95%;
      margin: 0 auto;
      padding: 2rem 1.5rem 3rem 1.5rem;
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    }

    /* Hero Section */
    .typing-guide-hero {
      text-align: center;
      margin-bottom: 2.5rem;
      padding: 2rem 1.5rem;
      background: linear-gradient(135deg, #4361ee 0%, #7209b7 100%);
      border-radius: 32px;
      box-shadow: 0 12px 30px rgba(67, 97, 238, 0.3);
    }

    .typing-guide-hero h2 {
      font-size: 2.6rem;
      font-weight: 800;
      color: white;
      margin-bottom: 1rem;
      letter-spacing: -0.02em;
      font-family: 'Playfair Display', serif;
    }

    .typing-guide-hero .typing-hero-sub {
      font-size: 1.2rem;
      color: rgba(255, 255, 255, 0.9);
      max-width: 720px;
      margin: 0 auto;
      line-height: 1.5;
    }

    .typing-guide-meta {
      display: flex;
      justify-content: center;
      gap: 2rem;
      color: rgba(255, 255, 255, 0.8);
      font-weight: 500;
      margin-top: 1.2rem;
      flex-wrap: wrap;
    }

    .typing-guide-meta span i {
      margin-right: 0.5rem;
    }

    /* Main Content */
    .typing-main-content {
      background: white;
      border-radius: 28px;
      padding: 2rem 2rem 2.5rem 2rem;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
      border: 1px solid rgba(67, 97, 238, 0.15);
    }

    .typing-main-content h2 {
      font-size: 1.8rem;
      font-weight: 700;
      margin-top: 2rem;
      margin-bottom: 1rem;
      color: #4361ee;
      border-left: 5px solid #7209b7;
      padding-left: 1rem;
      font-family: 'Playfair Display', serif;
    }

    .typing-main-content h2:first-of-type {
      margin-top: 0;
    }

    .typing-main-content h3 {
      font-size: 1.35rem;
      font-weight: 600;
      margin: 1.5rem 0 0.75rem 0;
      color: #7209b7;
    }

    .typing-main-content p {
      font-size: 1.05rem;
      color: #2d3748;
      margin-bottom: 1.2rem;
      line-height: 1.6;
    }

    .typing-main-content ul, .typing-main-content ol {
      margin: 1rem 0 1.2rem 1.8rem;
      color: #2d3748;
      line-height: 1.6;
    }

    .typing-main-content li {
      margin-bottom: 0.5rem;
    }

    .typing-highlight-box {
      background: linear-gradient(135deg, rgba(67, 97, 238, 0.08), rgba(114, 9, 183, 0.05));
      border-left: 6px solid #7209b7;
      padding: 1.25rem 1.5rem;
      border-radius: 20px;
      margin: 1.75rem 0;
    }

    .typing-pro-tip {
      background: rgba(114, 9, 183, 0.1);
      border-radius: 20px;
      padding: 1.2rem 1.5rem;
      margin: 1.5rem 0;
      display: flex;
      gap: 1rem;
      align-items: flex-start;
      border: 1px solid rgba(67, 97, 238, 0.3);
    }

    .typing-pro-tip i {
      font-size: 1.8rem;
      color: #7209b7;
    }

    .typing-stats-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 1.2rem;
      margin: 2rem 0;
    }

    .typing-stat-card {
      background: #f5f7fa;
      border-radius: 20px;
      padding: 1.2rem;
      text-align: center;
      transition: all 0.2s;
      border: 1px solid rgba(67, 97, 238, 0.2);
    }

    .typing-stat-card .stat-number {
      font-size: 2rem;
      font-weight: 800;
      color: #4361ee;
      margin-bottom: 0.25rem;
    }

    .typing-quote-block {
      background: #f5f7fa;
      padding: 1.5rem;
      border-radius: 24px;
      text-align: center;
      font-style: italic;
      margin: 1.5rem 0;
      border: 1px solid rgba(67, 97, 238, 0.2);
    }

    .typing-quote-block i {
      font-size: 2rem;
      color: #7209b7;
      margin-bottom: 0.5rem;
      display: inline-block;
    }

    .typing-table-wrapper {
      overflow-x: auto;
      margin: 1.5rem 0;
    }

    .typing-benchmark-table {
      width: 100%;
      border-collapse: collapse;
      background: #f5f7fa;
      border-radius: 16px;
      overflow: hidden;
    }

    .typing-benchmark-table th, .typing-benchmark-table td {
      padding: 12px 16px;
      text-align: left;
      border-bottom: 1px solid rgba(67, 97, 238, 0.2);
    }

    .typing-benchmark-table th {
      background: rgba(67, 97, 238, 0.1);
      font-weight: 600;
      color: #4361ee;
    }

    .typing-benchmark-table tr:hover {
      background: rgba(114, 9, 183, 0.05);
    }

    .typing-tips-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 1.2rem;
      margin: 1.5rem 0;
    }

    .typing-tip-card {
      background: #f5f7fa;
      border-radius: 16px;
      padding: 1.2rem;
      border: 1px solid rgba(67, 97, 238, 0.2);
      transition: all 0.2s;
    }

    .typing-tip-card:hover {
      transform: translateY(-3px);
      box-shadow: 0 8px 20px rgba(67, 97, 238, 0.1);
    }

    .typing-tip-title {
      font-weight: 700;
      color: #4361ee;
      margin-bottom: 0.5rem;
      font-size: 1.1rem;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .typing-footer-note {
      margin-top: 2.5rem;
      text-align: center;
      font-size: 0.85rem;
      color: #718096;
      border-top: 1px solid #e2e8f0;
      padding-top: 2rem;
    }

    @media (max-width: 768px) {
      .typing-guide-hero h2 {
        font-size: 2rem;
      }
      .typing-main-content {
        padding: 1.5rem;
      }
      #typing-guide-article {
        padding: 1rem;
      }
    }