body {
    background: #f5f7fa;
}

.baseconvert-tool-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0;
    background: white;
    border-radius: 12px 12px 0 0;
    padding: 0.5rem 0.5rem 0 0.5rem;
}

.tab-btn {
    padding: 0.875rem 2rem;
    border: none;
    background: transparent;
    color: #718096;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
}

.tab-btn:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.08);
}

.tab-btn.active {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    border-bottom-color: #667eea;
    box-shadow: 0 -2px 8px rgba(102, 126, 234, 0.1) inset;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.baseconvert-tool-container h1 {
    text-align: center;
    color: #333;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.converter-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.input-group,
.output-group {
    margin-bottom: 1.5rem;
}

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

.input-header label,
.output-header label {
    font-weight: 600;
    color: #444;
    font-size: 1.1rem;
}

.input-header select {
    padding: 0.6rem 1.2rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    color: #333;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.input-header select:focus {
    outline: none;
    border-color: #667eea;
}

.input-group textarea {
    width: 100%;
    min-height: 150px;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.input-hint {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    color: #888;
    font-size: 0.9rem;
}

.input-hint span:first-child {
    font-weight: 600;
    color: #667eea;
}

.arrow-section {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
}

.btn-primary {
    padding: 1rem 3rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.output-bases {
    display: flex;
    gap: 0.5rem;
}

.base-tag {
    padding: 0.5rem 1rem;
    background: #f0f0f0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
}

.base-tag.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

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

.output-item {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.25rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.output-item:hover {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.output-item.error {
    border-color: #ef4444;
    background: #fef2f2;
}

.output-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #718096;
    margin-bottom: 0.75rem;
}

.output-value {
    display: flex;
    gap: 0.75rem;
}

.output-value input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 1rem;
    background: #f8f9ff;
    color: #333;
}

.output-value input:focus {
    outline: none;
}

.copy-btn-small {
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.copy-btn-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.copy-btn-small.copied {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.quick-convert-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.quick-convert-section h3 {
    color: #444;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.875rem;
}

.quick-btn {
    padding: 0.875rem 1.25rem;
    background: #f7fafc;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Consolas', 'Monaco', monospace;
    font-weight: 500;
}

.quick-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.info-section {
    background: #f0fdf4;
    border: 1px solid #d1fae5;
    border-radius: 16px;
    padding: 1.75rem;
}

.info-section h3 {
    color: #065f46;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.info-section ul {
    padding-left: 1.5rem;
}

.info-section li {
    color: #374151;
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.text-results-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.text-results-header {
    display: grid;
    grid-template-columns: 1fr 2fr 2fr 80px;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    text-align: center;
}

.text-results-row {
    display: grid;
    grid-template-columns: 1fr 2fr 2fr 80px;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e0e0e0;
    align-items: center;
    transition: background 0.2s;
}

.text-results-row:last-child {
    border-bottom: none;
}

.text-results-row:hover {
    background: #f8f9ff;
}

.char-cell {
    font-size: 1.375rem;
    font-weight: 700;
    text-align: center;
    color: #667eea;
}

.code-cell {
    font-family: 'Consolas', 'Monaco', monospace;
    text-align: center;
    color: #333;
    background: #f7fafc;
    padding: 0.5rem;
    border-radius: 6px;
}

.text-combined {
    background: #f0fdf4;
    border: 1px solid #d1fae5;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.combined-label {
    font-weight: 700;
    color: #065f46;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.combined-value {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.95rem;
    color: #333;
    word-break: break-all;
    padding: 1rem 1.25rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 1rem;
    line-height: 1.8;
}

@media (max-width: 768px) {
    .baseconvert-tool-container {
        padding: 1rem;
    }
    
    .converter-section {
        padding: 1.25rem;
    }
    
    .output-results {
        grid-template-columns: 1fr;
    }
    
    .input-header,
    .output-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .output-bases {
        flex-wrap: wrap;
    }
    
    .quick-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .output-value {
        flex-direction: column;
    }
    
    .copy-btn-small {
        width: 100%;
    }
    
    .text-results-header,
    .text-results-row {
        grid-template-columns: 1fr 2fr 2fr;
    }
    
    .text-results-header span:last-child,
    .text-results-row button:last-child {
        display: none;
    }
    
    .tabs {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .tab-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
}
