/* General Styles */
:root {
    --primary-color: #ff5722;
    --primary-dark: #e64a19;
    --primary-light: #ffccbc;
    --text-color: #333;
    --text-light: #666;
    --background-color: #f5f5f5;
    --card-background: #ffffff;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --hover-color: rgba(0, 0, 0, 0.05);
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --error-color: #f44336;
    --transition-speed: 0.3s;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.dark-mode {
    --primary-color: #ff7043;
    --primary-dark: #ff5722;
    --primary-light: #ffab91;
    --text-color: #e0e0e0;
    --text-light: #b0b0b0;
    --background-color: #121212;
    --card-background: #1e1e1e;
    --border-color: #333333;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --hover-color: rgba(255, 255, 255, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color var(--transition-speed) ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    transition: all var(--transition-speed) ease;
}

/* Button and Input Styles */
button, select, input[type="text"], input[type="range"] {
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
    background-color: var(--card-background);
    color: var(--text-color);
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

button:hover {
    background-color: var(--primary-dark);
}

button i {
    font-size: 1rem;
}

select:focus, input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(255, 87, 34, 0.2);
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 2px solid var(--border-color);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

header h1 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 2.5rem;
}

header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.theme-toggle button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.theme-toggle button:hover {
    background-color: var(--hover-color);
}

/* Tab Styles */
.tab-container {
    margin-bottom: 30px;
    background-color: var(--card-background);
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow-color);
    overflow: hidden;
}

.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--card-background);
}

.tab-button {
    padding: 15px 20px;
    border: none;
    background-color: transparent;
    color: var(--text-color);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-grow: 1;
    border-bottom: 3px solid transparent;
}

.tab-button:hover {
    background-color: var(--hover-color);
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    background-color: transparent;
}

.tab-content {
    display: none;
    padding: 20px;
}

.tab-content.active {
    display: block;
}

/* Converter Section Styles */
.converter {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
}

.input-section, .output-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-section h2, .output-section h2 {
    color: var(--text-color);
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.control-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.control-left, .control-right {
    display: flex;
    gap: 10px;
}

textarea {
    width: 100%;
    height: 250px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    resize: none;
    font-size: 1rem;
    line-height: 1.5;
    background-color: var(--card-background);
    color: var(--text-color);
    transition: all var(--transition-speed) ease;
}

.char-count {
    font-size: 0.8rem;
    color: var(--text-light);
    text-align: right;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15px;
}

#convertBtn {
    padding: 12px 20px;
    font-size: 1rem;
}

#swapBtn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border-radius: 50%;
    margin: 0 auto;
}

.auto-convert-option {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.auto-convert-option input[type="checkbox"] {
    margin-right: 5px;
}

/* Batch Converter Styles */
.batch-converter {
    padding: 10px 0;
}

.batch-instructions {
    margin-bottom: 20px;
}

.batch-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.batch-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.batch-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.batch-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: var(--hover-color);
    border-bottom: 1px solid var(--border-color);
}

.batch-item-title {
    font-weight: 600;
    color: var(--text-color);
}

.batch-item-controls {
    display: flex;
    gap: 10px;
}

.batch-item-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    padding: 15px;
}

.batch-input, .batch-output {
    height: 150px;
}

.batch-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Font Viewer Styles */
.font-viewer {
    padding: 10px 0;
}

.font-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.font-selector, .font-size {
    display: flex;
    align-items: center;
    gap: 10px;
}

.font-preview {
    padding: 30px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 30px;
    min-height: 200px;
    background-color: var(--card-background);
}

#previewText {
    font-size: 24px;
    outline: none;
}

.font-comparison {
    margin-top: 30px;
}

.font-comparison h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th, td {
    border: 1px solid var(--border-color);
    padding: 10px;
    text-align: center;
}

th {
    background-color: var(--hover-color);
    font-weight: 600;
}

/* History Styles */
.conversion-history {
    padding: 10px 0;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.history-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.history-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    background-color: var(--card-background);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.history-text {
    display: flex;
    gap: 20px;
}

.history-input, .history-output {
    flex: 1;
}

.history-text p {
    margin-bottom: 5px;
    font-weight: 600;
}

.history-content {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    max-height: 100px;
    overflow-y: auto;
    background-color: var(--card-background);
}

.empty-history {
    text-align: center;
    color: var(--text-light);
    padding: 30px 0;
}

/* Info Section Styles */
.info-section {
    background-color: var(--card-background);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.info-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.info-section p {
    margin-bottom: 10px;
}

kbd {
    background-color: var(--hover-color);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    padding: 2px 5px;
    font-size: 0.9em;
}

/* Footer Styles */
footer {
    text-align: center;
    padding: 20px 0;
    color: var(--text-light);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

.footer-links {
    margin-top: 10px;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--card-background);
    border-radius: 8px;
    padding: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.close-modal:hover {
    color: var(--error-color);
}

#modalTitle {
    margin-bottom: 20px;
    color: var(--primary-color);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .converter {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: row;
        margin: 15px 0;
    }
    
    #swapBtn {
        transform: rotate(90deg);
    }
    
    .batch-item-content {
        grid-template-columns: 1fr;
    }
    
    .batch-arrow {
        transform: rotate(90deg);
        margin: 10px 0;
    }
    
    .tabs {
        flex-wrap: wrap;
    }
    
    .tab-button {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    .control-panel {
        flex-direction: column;
        gap: 10px;
    }
    
    .control-right, .control-left {
        width: 100%;
        justify-content: space-between;
    }
} 