 :root {
            --primary: #4361ee;
            --primary-dark: #3a56d4;
            --secondary: #7209b7;
            --success: #4cc9f0;
            --error: #f72585;
            --warning: #ff9f1c;
            --dark: #212529;
            --darker: #121417;
            --light: #f8f9fa;
            --lighter: #ffffff;
            --gray: #6c757d;
            --gray-light: #e9ecef;
            --border-radius: 16px;
            --shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
            --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.15);
            --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
            --text-gradient: linear-gradient(90deg, var(--primary), var(--secondary));
        }

        /* Dark mode variables */
        [data-theme="dark"] {
            --dark: #f8f9fa;
            --darker: #121417;
            --light: #212529;
            --lighter: #2b3035;
            --gray-light: #343a40;
            --shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
            --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.35);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        .main-container {
            font-family: 'Inter', sans-serif;
            background-color: var(--light);
            color: var(--dark);
            line-height: 1.6;
            min-height: 100vh;
            transition: background-color 0.3s ease, color 0.3s ease;
        }

        .container {
            width: 95%;
            margin: 0 auto;
            padding: 0 20px;
        }

        .header-title {
            padding: 40px 0;
            text-align: center;
        }

        h1, h2, h3 {
            font-family: 'Playfair Display', serif;
            font-weight: 700;
            line-height: 1.2;
        }

        h1 {
            font-size: 3rem;
            margin-bottom: 15px;
            background: var(--text-gradient);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }

        .subtitle {
            font-size: 1.25rem;
            color: var(--gray);
            max-width: 700px;
            margin: 0 auto 30px;
            font-weight: 400;
        }

        .main-content {
            display: grid;
            grid-template-columns: 1fr;
            gap: 40px;
            margin-bottom: 60px;
        }

        .card {
            background-color: var(--lighter);
            border-radius: var(--border-radius);
            box-shadow: var(--shadow);
            padding: 40px;
            transition: var(--transition);
        }

        .card:hover {
            box-shadow: var(--shadow-hover);
            transform: translateY(-5px);
        }

        .tool-section {
            margin-bottom: 40px;
        }

        .input-group {
            position: relative;
            margin-bottom: 25px;
        }

        .input-label {
            display: block;
            margin-bottom: 10px;
            font-weight: 600;
            color: var(--dark);
        }

        .input-field {
            width: 100%;
            padding: 18px 25px;
            font-size: 1.1rem;
            border: 2px solid var(--gray-light);
            border-radius: var(--border-radius);
            background-color: var(--lighter);
            color: var(--dark);
            transition: var(--transition);
        }

        .input-field:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.2);
        }

        .input-field::placeholder {
            color: var(--gray);
            opacity: 0.7;
        }

        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 16px 32px;
            font-size: 1.1rem;
            font-weight: 600;
            border-radius: var(--border-radius);
            cursor: pointer;
            transition: var(--transition);
            border: none;
        }

        .btn-primary {
            background-color: var(--primary);
            color: white;
        }

        .btn-primary:hover {
            background-color: var(--primary-dark);
            transform: translateY(-2px);
        }

        .btn-icon {
            margin-right: 10px;
        }

        .result-container {
            margin-top: 30px;
            padding: 25px;
            border-radius: var(--border-radius);
            display: none;
        }

        .result-success {
            background-color: rgba(76, 201, 240, 0.1);
            border-left: 5px solid var(--success);
        }

        .result-error {
            background-color: rgba(247, 37, 133, 0.1);
            border-left: 5px solid var(--error);
        }

        .result-title {
            display: flex;
            align-items: center;
            margin-bottom: 15px;
            font-size: 1.3rem;
        }

        .result-icon {
            margin-right: 12px;
            font-size: 1.5rem;
        }

        .result-text {
            line-height: 1.7;
        }

        .processed-text {
            font-family: monospace;
            background-color: rgba(0, 0, 0, 0.05);
            padding: 10px 15px;
            border-radius: 8px;
            margin: 15px 0;
            word-break: break-all;
        }

        .stats-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-top: 30px;
        }

        .stat-card {
            background-color: var(--lighter);
            padding: 20px;
            border-radius: 12px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        }

        .stat-value {
            font-size: 2rem;
            font-weight: 700;
            color: var(--primary);
            margin-bottom: 5px;
        }

        .stat-label {
            color: var(--gray);
            font-size: 0.9rem;
        }

        .history-section {
            margin-top: 40px;
        }

        .history-title {
            display: flex;
            align-items: center;
            margin-bottom: 20px;
            color: var(--gray);
        }

        .history-icon {
            margin-right: 10px;
        }

        .history-items {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 15px;
        }

        .history-item {
            padding: 15px;
            border-radius: 12px;
            background-color: var(--lighter);
            cursor: pointer;
            transition: var(--transition);
            border-left: 4px solid var(--gray-light);
        }

        .history-item:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow);
        }

        .history-item-palindrome {
            border-left-color: var(--success);
        }

        .history-item-not-palindrome {
            border-left-color: var(--error);
        }

        .history-item-text {
            font-weight: 500;
            margin-bottom: 5px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .history-item-status {
            font-size: 0.8rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .palindrome-status {
            color: var(--success);
        }

        .not-palindrome-status {
            color: var(--error);
        }

        .info-section {
            margin-top: 60px;
        }

        .info-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
            margin-top: 30px;
        }

        .info-card {
            background-color: var(--lighter);
            padding: 30px;
            border-radius: var(--border-radius);
            box-shadow: var(--shadow);
            transition: var(--transition);
        }

        .info-card:hover {
            transform: translateY(-5px);
            box-shadow: var(--shadow-hover);
        }

        .info-card-icon {
            font-size: 2.5rem;
            color: var(--primary);
            margin-bottom: 20px;
        }

        .info-card-title {
            font-size: 1.5rem;
            margin-bottom: 15px;
            color: var(--dark);
        }

        .examples-section {
            margin-top: 40px;
        }

        .examples-list {
            list-style-type: none;
            margin-top: 20px;
        }

        .examples-list li {
            padding: 12px 0;
            border-bottom: 1px solid var(--gray-light);
            display: flex;
            justify-content: space-between;
        }

        .examples-list li:last-child {
            border-bottom: none;
        }

        .example-text {
            font-weight: 500;
        }

        .example-type {
            font-size: 0.8rem;
            padding: 4px 10px;
            border-radius: 20px;
            background-color: var(--primary);
            color: white;
        }

       

       

        @media (max-width: 768px) {
            h1 {
                font-size: 2.2rem;
            }
            
            .subtitle {
                font-size: 1.1rem;
            }
            
            .card {
                padding: 25px;
            }
            
            .input-field {
                padding: 15px 20px;
            }
            
            .btn {
                padding: 14px 25px;
            }
            
            .stats-container {
                grid-template-columns: 1fr;
            }
        }

        /* Animations */
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .fade-in {
            animation: fadeIn 0.5s ease forwards;
        }

        /* Tooltip */
        .tooltip {
            position: relative;
            display: inline-block;
            cursor: pointer;
        }

        .tooltip .tooltip-text {
            visibility: hidden;
            width: 200px;
            background-color: var(--darker);
            color: #fff;
            text-align: center;
            border-radius: 6px;
            padding: 10px;
            position: absolute;
            z-index: 1;
            bottom: 125%;
            left: 50%;
            transform: translateX(-50%);
            opacity: 0;
            transition: opacity 0.3s;
            font-size: 0.9rem;
            font-weight: normal;
        }

        .tooltip:hover .tooltip-text {
            visibility: visible;
            opacity: 1;
        }


 /* ===== ARTICLE SPECIFIC STYLES - NO BODY STYLES ===== */
 #palindrome-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 */
    .pal-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);
    }

    .pal-guide-hero h2 {
      font-size: 2.6rem;
      font-weight: 800;
      color: white;
      margin-bottom: 1rem;
      letter-spacing: -0.02em;
      font-family: 'Playfair Display', serif;
    }

    .pal-guide-hero .pal-hero-sub {
      font-size: 1.2rem;
      color: rgba(255, 255, 255, 0.9);
      max-width: 720px;
      margin: 0 auto;
      line-height: 1.5;
    }

    .pal-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;
    }

    .pal-guide-meta span i {
      margin-right: 0.5rem;
    }

    /* Main Content */
    .pal-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);
    }

    .pal-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;
    }

    .pal-main-content h2:first-of-type {
      margin-top: 0;
    }

    .pal-main-content h3 {
      font-size: 1.35rem;
      font-weight: 600;
      margin: 1.5rem 0 0.75rem 0;
      color: #7209b7;
    }

    .pal-main-content p {
      font-size: 1.05rem;
      color: #2d3748;
      margin-bottom: 1.2rem;
      line-height: 1.6;
    }

    .pal-main-content ul, .pal-main-content ol {
      margin: 1rem 0 1.2rem 1.8rem;
      color: #2d3748;
      line-height: 1.6;
    }

    .pal-main-content li {
      margin-bottom: 0.5rem;
    }

    .pal-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;
    }

    .pal-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);
    }

    .pal-pro-tip i {
      font-size: 1.8rem;
      color: #7209b7;
    }

    .pal-stats-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 1.2rem;
      margin: 2rem 0;
    }

    .pal-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);
    }

    .pal-stat-card .stat-number {
      font-size: 2rem;
      font-weight: 800;
      color: #4361ee;
      margin-bottom: 0.25rem;
    }

    .pal-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);
    }

    .pal-quote-block i {
      font-size: 2rem;
      color: #7209b7;
      margin-bottom: 0.5rem;
      display: inline-block;
    }

    .pal-table-wrapper {
      overflow-x: auto;
      margin: 1.5rem 0;
    }

    .pal-examples-table {
      width: 100%;
      border-collapse: collapse;
      background: #f5f7fa;
      border-radius: 16px;
      overflow: hidden;
    }

    .pal-examples-table th, .pal-examples-table td {
      padding: 12px 16px;
      text-align: left;
      border-bottom: 1px solid rgba(67, 97, 238, 0.2);
    }

    .pal-examples-table th {
      background: rgba(67, 97, 238, 0.1);
      font-weight: 600;
      color: #4361ee;
    }

    .pal-examples-table tr:hover {
      background: rgba(114, 9, 183, 0.05);
    }

    .pal-types-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 1.2rem;
      margin: 1.5rem 0;
    }

    .pal-type-card {
      background: #f5f7fa;
      border-radius: 16px;
      padding: 1.2rem;
      border: 1px solid rgba(67, 97, 238, 0.2);
      transition: all 0.2s;
    }

    .pal-type-card:hover {
      transform: translateY(-3px);
      box-shadow: 0 8px 20px rgba(67, 97, 238, 0.1);
    }

    .pal-type-title {
      font-weight: 700;
      color: #4361ee;
      margin-bottom: 0.5rem;
      font-size: 1.1rem;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .pal-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) {
      .pal-guide-hero h2 {
        font-size: 2rem;
      }
      .pal-main-content {
        padding: 1.5rem;
      }
      #palindrome-guide-article {
        padding: 1rem;
      }
    }