/* Root Variables */
:root {
    --primary-color: #8A5C13;
    --primary-light: #D5BB91;
    --background: #F8F5F1;
    --text-primary: #2C2C2C;
    --text-secondary: #666;
    --success: #27AE60;
    --border: #E8E1D8;
    --shadow: rgba(0, 0, 0, 0.08);
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #FFFCF5;
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

/* Font Families */
.sans-serif-font {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.serif-font {
    font-family: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
}

/* Main Container */
.main-container {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    min-height: calc(100vh - 40px);
}

/* Header */
.title {
    color: #8A5C13;
    font-size: clamp(28px, 4vw, 40px);
    font-family: 'Mohave', sans-serif;
    font-weight: 700;
    margin: 5px 0 25px 0;
    display: inline-block;
}

.font-buttons {
    position: absolute;
    right: 0;
    top: 8px;
    display: flex;
    gap: 10px;
}

.font-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid #D5BB91;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8A5C13;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.font-btn.active {
    background: #FFE6BE;
    border-color: #8A5C13;
}

.font-btn:not(.active) {
    background: #FFFDF8;
}

.font-btn:hover {
    border-color: #8A5C13;
}

.font-btn-1 {
    font-family: 'Libre Baskerville', serif;
    font-weight: 400;
}

.font-btn-2 {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
}

/* Main Content Area */
.content-area {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    min-height: 500px;
    height: calc(100vh - 200px);
    max-height: 700px;
}

/* Main Panels */
.input-panel, .output-panel {
    flex: 1;
    background: white;
    border-radius: 4px;
    border: 1px solid #D5BB91;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Text Areas */
#input-text {
    flex: 1;
    border: none;
    outline: none;
    resize: none;
    font-family: 'Inter', sans-serif;
    font-size: 17px;
    font-weight: 400;
    color: #463C2C;
    line-height: 1.6;
    background: transparent;
    padding: 20px;
    margin: 0;
}

#input-text::placeholder {
    color: #A89479;
    opacity: 0.7;
}

.output-display {
    flex: 1;
    font-family: 'Inter', sans-serif;
    font-size: 17px;
    font-weight: 400;
    color: #463C2C;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-y: auto;
    padding: 20px;
    margin: 0;
}

/* Stats */
.input-stats, .output-stats {
    padding: 10px 20px;
    border-top: 1px solid #DAC39F;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #D5BB91;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    min-height: 50px;
}

.stats-left {
    display: flex;
    gap: 20px;
}

/* Copy Button */
.copy-button {
    background: none;
    border: none;
    color: #8A5C13;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin: 0;
    transition: opacity 0.2s ease;
}

.copy-button:hover {
    opacity: 0.7;
}

/* Small Process Button */
.process-button-small {
    background: #8A5C13;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.process-button-small:hover:not(:disabled) {
    background: #6B4510;
    transform: translateY(-1px);
}

.process-button-small:disabled {
    background: #A89479;
    cursor: not-allowed;
    transform: none;
}

/* Loading */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    background: white;
    padding: 2rem 2.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    font-weight: 600;
    color: #8A5C13;
    z-index: 20;
    border: 1px solid #D5BB91;
    min-width: 300px;
}

#loading-text {
    font-size: 16px;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Progress Bar */
.progress-bar {
    width: 200px;
    height: 6px;
    background: #F5F0E8;
    border-radius: 3px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8A5C13, #6B4510);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

/* Pass Info */
.pass-info {
    font-size: 14px;
    font-weight: 500;
    color: #6B4510;
    text-align: center;
}

#current-pass {
    font-weight: 600;
    color: #8A5C13;
}

/* Custom Popup */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-content {
    background: white;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 24px;
    max-width: 300px;
    text-align: center;
}

.popup-message {
    color: #463C2C;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 16px;
}

.popup-button {
    background: none;
    border: none;
    color: #8A5C13;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    transition: opacity 0.2s ease;
}

.popup-button:hover {
    opacity: 0.7;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #D5BB91;
    border-top-color: #8A5C13;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Font Family Classes */
.serif-font #input-text,
.serif-font .output-display {
    font-family: 'Libre Baskerville', serif !important;
}

.sans-serif-font #input-text,
.sans-serif-font .output-display {
    font-family: 'Inter', sans-serif !important;
}

/* Scrollbar Styling */
.output-display::-webkit-scrollbar {
    width: 6px;
}

.output-display::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.output-display::-webkit-scrollbar-thumb {
    background: #D5BB91;
    border-radius: 3px;
}

.output-display::-webkit-scrollbar-thumb:hover {
    background: #8A5C13;
}

/* Responsive Design */
@media (max-width: 900px) {
    body {
        padding: 15px;
    }
    
    .content-area {
        flex-direction: column;
        gap: 15px;
        height: auto;
    }
    
    .font-buttons {
        right: 15px;
        top: 5px;
    }
    
    .main-container {
        min-height: auto;
    }

    .input-panel, .output-panel {
        min-height: 300px;
    }
    
    .stats-left {
        flex-direction: column;
        gap: 5px;
        align-items: flex-start;
    }
} 