/* static/css/style.css */

:root {
    --primary-color: #FF4B4B;
    --primary-hover: #FF2E2E;
    --bg-color: #F8F9FA;
    --text-color: #333;
    --border-color: #EEE;
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 60px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    z-index: 1000;
}

.nav-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-btn:hover {
    color: var(--primary-color);
    background-color: #FFF0F0;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 60px; /* Below navbar */
    bottom: 0;
    width: 350px;
    background: white;
    box-shadow: var(--shadow);
    padding: 2rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 900;
    overflow-y: auto;
}

.sidebar-left {
    left: 0;
    transform: translateX(-100%);
    border-right: 1px solid var(--border-color);
}

.sidebar-right {
    right: 0;
    transform: translateX(100%);
    border-left: 1px solid var(--border-color);
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    border-bottom: 2px solid #F0F0F0;
    padding-bottom: 0.5rem;
}

/* Main Content */
.main-content {
    margin-top: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    transition: margin 0.3s;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    text-align: center;
}

.hero-subtitle {
    color: #888;
    margin-bottom: 3rem;
    text-align: center;
}

/* Upload Area */
.upload-area {
    width: 100%;
    max-width: 600px;
    background: white;
    border: 2px dashed #FFD1D1;
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.upload-area:hover, .upload-area.dragover {
    border-color: var(--primary-color);
    background-color: #FFF9F9;
    transform: scale(1.01);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.upload-text {
    font-size: 1.1rem;
    color: #666;
}

/* Progress & Status */
.status-container {
    width: 100%;
    max-width: 600px;
    margin-top: 2rem;
    display: none; /* Hidden by default */
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: #EEE;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease;
}

.status-text {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #666;
    display: flex;
    justify-content: space-between;
}

.log-box {
    margin-top: 1rem;
    background: #1E1E1E;
    color: #00FF00;
    padding: 1rem;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.85rem;
    height: 150px;
    overflow-y: auto;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-input, .form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #DDD;
    border-radius: 8px;
    font-size: 0.95rem;
    box-sizing: border-box; /* Fix padding issue */
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 75, 75, 0.1);
}

/* Buttons */
.btn-primary {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s;
}

/* Tutorial Modal Specific */
.tutorial-modal-content {
    max-width: 900px !important;
    width: 90% !important;
    height: auto;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.tutorial-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    margin-top: 10px;
}

.tutorial-container blockquote {
    border-left: 5px solid var(--primary-color);
    background-color: #FFF5F5;
    padding: 10px 15px;
    margin: 1rem 0;
    border-radius: 4px;
    color: #555;
    font-style: italic;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

/* History Items */
.history-item {
    background: #F9F9F9;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 3px solid var(--primary-color);
}
.history-title {
    font-weight: 600;
    margin-bottom: 0.3rem;
}
.history-meta {
    font-size: 0.8rem;
    color: #888;
}
.download-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
    }
    .navbar {
        font-size: 0.9rem;
        gap: 0.5rem;
    }
}
