:root {
            --primary: #4361ee;
            --primary-dark: #3a56d4;
            --secondary: #7209b7;
            --accent: #f72585;
            --light: #f8f9fa;
            --dark: #212529;
            --gray: #6c757d;
            --success: #4cc9f0;
            --card-bg: #ffffff;
            --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            --radius: 16px;
            --transition: all 0.3s ease;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Poppins', sans-serif;
        }

        body {
            background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
            color: var(--dark);
            line-height: 1.6;
            min-height: 100vh;
            padding: 20px;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
        }

        header {
            text-align: center;
            margin-bottom: 40px;
            padding: 20px;
        }

        h1 {
            font-size: 2.8rem;
            margin-bottom: 15px;
            background: linear-gradient(90deg, var(--primary), var(--secondary));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            font-weight: 700;
            letter-spacing: -0.5px;
        }

        .subtitle {
            font-size: 1.2rem;
            color: var(--gray);
            max-width: 700px;
            margin: 0 auto 25px;
            font-weight: 400;
        }

        .converter-container {
            display: grid;
            grid-template-columns: 1fr;
            gap: 30px;
        }

        @media (min-width: 992px) {
            .converter-container {
                grid-template-columns: 1fr 1fr;
            }
        }

        .card {
            background: var(--card-bg);
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            padding: 30px;
            transition: var(--transition);
            position: relative;
            overflow: hidden;
        }

        .card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 5px;
            background: linear-gradient(90deg, var(--primary), var(--secondary));
        }

        .card:hover {
            transform: translateY(-8px);
            box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
        }

        .card-header {
            display: flex;
            align-items: center;
            margin-bottom: 25px;
            padding-bottom: 20px;
            border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        }

        .card-icon {
            width: 60px;
            height: 60px;
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 20px;
            color: white;
            font-size: 1.5rem;
            box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
        }

        .card-title {
            font-size: 1.6rem;
            font-weight: 600;
            color: var(--dark);
        }

        .card-description {
            color: var(--gray);
            font-size: 0.95rem;
            margin-top: 5px;
        }

        .input-group {
            margin-bottom: 25px;
        }

        label {
            display: block;
            margin-bottom: 10px;
            font-weight: 500;
            color: var(--dark);
            font-size: 1rem;
        }

        .input-with-icon {
            position: relative;
        }

        textarea, input, select {
            width: 100%;
            padding: 16px 20px;
            border: 1.5px solid #e1e5eb;
            border-radius: 10px;
            font-size: 1rem;
            transition: var(--transition);
            background-color: #fff;
            color: var(--dark);
            resize: vertical;
            min-height: 120px;
            font-family: 'Consolas', 'Monaco', monospace;
        }

        textarea:focus, input:focus, select:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
        }

        .input-icon {
            position: absolute;
            right: 20px;
            top: 20px;
            color: var(--gray);
            font-size: 1.1rem;
        }

        .options-group {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
            margin-top: 25px;
        }

        @media (max-width: 576px) {
            .options-group {
                grid-template-columns: 1fr;
            }
        }

        .checkbox-group {
            display: flex;
            align-items: center;
            margin-bottom: 15px;
        }

        .checkbox-group input {
            width: auto;
            margin-right: 10px;
        }

        .checkbox-group label {
            margin-bottom: 0;
            font-weight: 400;
        }

        .result-container {
            background: linear-gradient(135deg, #f0f4ff, #e6f0ff);
            border-radius: 12px;
            padding: 25px;
            margin-top: 20px;
            border-left: 5px solid var(--primary);
            position: relative;
        }

        .result-label {
            font-size: 1rem;
            color: var(--gray);
            margin-bottom: 10px;
            font-weight: 500;
        }

        .result-value {
            font-size: 1.1rem;
            font-weight: 500;
            color: var(--dark);
            line-height: 1.5;
            word-break: break-all;
            font-family: 'Consolas', 'Monaco', monospace;
            background: rgba(255, 255, 255, 0.7);
            padding: 15px;
            border-radius: 8px;
            min-height: 60px;
            max-height: 200px;
            overflow-y: auto;
        }

        .result-value.ascii {
            color: var(--primary);
            font-weight: 600;
        }

        .stats-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 15px;
            margin-top: 25px;
        }

        .stat-item {
            background: white;
            border-radius: 10px;
            padding: 15px;
            text-align: center;
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
        }

        .stat-value {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--secondary);
            margin-bottom: 5px;
        }

        .stat-label {
            font-size: 0.85rem;
            color: var(--gray);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .action-buttons {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            margin-top: 30px;
        }

        .btn {
            padding: 14px 24px;
            border: none;
            border-radius: 10px;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            font-size: 1rem;
            flex: 1;
            min-width: 140px;
        }

        .btn-primary {
            background: var(--primary);
            color: white;
            box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
        }

        .btn-primary:hover {
            background: var(--primary-dark);
            transform: translateY(-2px);
            box-shadow: 0 6px 15px rgba(67, 97, 238, 0.4);
        }

        .btn-secondary {
            background: #e9ecef;
            color: var(--dark);
        }

        .btn-secondary:hover {
            background: #dee2e6;
            transform: translateY(-2px);
        }

        .btn-accent {
            background: var(--accent);
            color: white;
            box-shadow: 0 4px 12px rgba(247, 37, 133, 0.3);
        }

        .btn-accent:hover {
            background: #e11574;
            transform: translateY(-2px);
            box-shadow: 0 6px 15px rgba(247, 37, 133, 0.4);
        }

        .btn-success {
            background: var(--success);
            color: white;
            box-shadow: 0 4px 12px rgba(76, 201, 240, 0.3);
        }

        .btn-success:hover {
            background: #3ab3d9;
            transform: translateY(-2px);
            box-shadow: 0 6px 15px rgba(76, 201, 240, 0.4);
        }

        .history-section {
            margin-top: 35px;
        }

        .history-title {
            font-size: 1.2rem;
            margin-bottom: 20px;
            color: var(--dark);
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .history-title i {
            color: var(--primary);
        }

        .history-list {
            max-height: 250px;
            overflow-y: auto;
            border-radius: 10px;
            background: #f8f9fa;
            padding: 10px;
        }

        .history-item {
            display: flex;
            justify-content: space-between;
            padding: 15px;
            border-bottom: 1px solid #e9ecef;
            font-size: 0.95rem;
            transition: var(--transition);
        }

        .history-item:hover {
            background: white;
            border-radius: 8px;
        }

        .history-item:last-child {
            border-bottom: none;
        }

        .history-text {
            color: var(--dark);
            font-weight: 500;
            max-width: 45%;
            word-break: break-all;
        }

        .history-result {
            color: var(--primary);
            font-weight: 600;
            max-width: 45%;
            word-break: break-all;
        }

        .history-time {
            color: var(--gray);
            font-size: 0.85rem;
            margin-top: 5px;
            width: 100%;
        }

        footer {
            text-align: center;
            margin-top: 60px;
            padding: 25px;
            color: var(--gray);
            font-size: 0.95rem;
            border-top: 1px solid rgba(0, 0, 0, 0.05);
        }

        .feature-highlights {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 25px;
            margin-top: 50px;
        }

        .feature {
            display: flex;
            align-items: center;
            background: var(--card-bg);
            padding: 20px;
            border-radius: 12px;
            box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
            transition: var(--transition);
        }

        .feature:hover {
            transform: translateY(-5px);
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
        }

        .feature-icon {
            width: 50px;
            height: 50px;
            background: rgba(67, 97, 238, 0.1);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 20px;
            color: var(--primary);
            font-size: 1.3rem;
        }

        .feature-text {
            font-weight: 500;
            font-size: 1.05rem;
        }

        /* ASCII Table Styles */
        .ascii-table-container {
            margin-top: 30px;
            overflow-x: auto;
        }

        .ascii-table {
            width: 100%;
            border-collapse: collapse;
            background: white;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
        }

        .ascii-table th {
            background: var(--primary);
            color: white;
            padding: 12px 15px;
            text-align: left;
            font-weight: 600;
        }

        .ascii-table td {
            padding: 10px 15px;
            border-bottom: 1px solid #e9ecef;
        }

        .ascii-table tr:hover {
            background: #f8f9fa;
        }

        .ascii-table tr:last-child td {
            border-bottom: none;
        }

        /* Responsive adjustments */
        @media (max-width: 768px) {
            h1 {
                font-size: 2.2rem;
            }
            
            .card {
                padding: 25px 20px;
            }
            
            .converter-container {
                gap: 25px;
            }
            
            .btn {
                min-width: 120px;
                padding: 12px 20px;
            }
        }

        @media (max-width: 576px) {
            h1 {
                font-size: 1.9rem;
            }
            
            .card-header {
                flex-direction: column;
                text-align: center;
            }
            
            .card-icon {
                margin-right: 0;
                margin-bottom: 15px;
            }
            
            .action-buttons {
                flex-direction: column;
            }
            
            .btn {
                width: 100%;
            }
            
            .history-item {
                flex-direction: column;
            }
            
            .history-text, .history-result {
                max-width: 100%;
                margin-bottom: 10px;
            }
        }

        /* Custom scrollbar */
        ::-webkit-scrollbar {
            width: 8px;
        }

        ::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 10px;
        }

        ::-webkit-scrollbar-thumb {
            background: var(--primary);
            border-radius: 10px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: var(--primary-dark);
        }

        /* ASCII formatting */
        .ascii-formatted {
            letter-spacing: 1px;
        }

        /* Tooltip */
        .tooltip {
            position: relative;
            display: inline-block;
        }

        .tooltip .tooltiptext {
            visibility: hidden;
            width: 200px;
            background-color: var(--dark);
            color: #fff;
            text-align: center;
            border-radius: 6px;
            padding: 8px;
            position: absolute;
            z-index: 1;
            bottom: 125%;
            left: 50%;
            margin-left: -100px;
            opacity: 0;
            transition: opacity 0.3s;
            font-size: 0.8rem;
        }

        .tooltip:hover .tooltiptext {
            visibility: visible;
            opacity: 1;
        }