:root {
    --bg-dark: #0a0b10;
    --panel-bg: rgba(20, 22, 28, 0.9);
    --panel-border: rgba(250, 204, 21, 0.15);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --primary-color: #facc15; /* Bumblebee Yellow */
    --primary-hover: #eab308;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    
    --grad-primary: linear-gradient(135deg, #facc15, #ca8a04);
    --grad-warning: linear-gradient(135deg, #f59e0b, #ea580c);
    --grad-success: linear-gradient(135deg, #10b981, #059669);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        linear-gradient(rgba(250,204,21,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(250,204,21,0.03) 1px, transparent 1px),
        radial-gradient(circle at 50% 10%, rgba(250, 204, 21, 0.1) 0%, transparent 40%);
    background-size: 40px 40px, 40px 40px, 100% 100%;
    margin: 0;
}

/* Base Components */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--panel-border);
    border-radius: 4px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(250, 204, 21, 0.05);
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 2px;
    font-size: 14px;
    font-weight: 700;
        font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}
.btn-primary:not(:disabled):hover { background-color: var(--primary-hover); }

.btn-secondary {
    background-color: rgba(255,255,255,0.1);
    color: white;
}
.btn-secondary:not(:disabled):hover { background-color: rgba(255,255,255,0.2); }

.btn-primary-gradient { background: var(--grad-primary); border: none; color: white; }
.btn-warning-gradient { background: var(--grad-warning); border: none; color: white; }
.btn-success-gradient { background: var(--grad-success); border: none; color: white; }

.btn-primary-gradient:not(:disabled):hover,
.btn-warning-gradient:not(:disabled):hover,
.btn-success-gradient:not(:disabled):hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

/* Layout */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--panel-border);
}

.global-status-bar {
    display: flex; align-items: center; justify-content: flex-start;
    font-size: 14px; font-weight: 500;
    transition: all 0.3s ease;
}
.status-info { color: var(--primary-color); border-left-color: var(--primary-color) !important; }
.status-success { color: var(--success-color); border-left-color: var(--success-color) !important; }
.status-error { color: var(--danger-color); border-left-color: var(--danger-color) !important; }

h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--primary-color);
    padding-bottom: 8px;
}
h2 i { color: var(--text-primary); opacity: 0.8; font-size: 16px;}
.logo { display: flex; align-items: center; gap: 12px; }
.logo img { height: 45px; object-fit: contain; filter: drop-shadow(0 0 10px rgba(250, 204, 21, 0.4)); }
.logo div { display: flex; flex-direction: column; justify-content: center; }
.logo h1 { font-family: 'Orbitron', sans-serif; font-size: 24px; font-weight: 700; color: var(--primary-color); letter-spacing: 1px; margin: 0; line-height: 1.2;}
.sub-logo { font-size: 10px; color: var(--text-secondary); letter-spacing: 3px; font-family: 'Orbitron', sans-serif; }

/* Auth Overlay */
.auth-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(10, 11, 16, 0.95); backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center; z-index: 9999;
}
.auth-box {
    width: 400px; padding: 40px 30px; text-align: center;
    border-radius: 16px; border: 1px solid var(--primary-color);
    box-shadow: 0 0 30px rgba(250, 204, 21, 0.1);
    transition: all 0.3s;
}
.auth-logo { margin-bottom: 15px; }
.auth-logo img { height: 80px; object-fit: contain; filter: drop-shadow(0 0 15px rgba(250, 204, 21, 0.5)); }
.auth-box h2 { font-family: 'Orbitron', sans-serif; color: var(--primary-color); font-size: 24px; margin-bottom: 5px; justify-content: center;}
.auth-box p { color: var(--text-secondary); font-size: 14px; margin-bottom: 25px; }
.auth-box input {
    width: 100%; padding: 12px; background: rgba(0,0,0,0.5);
    border: 1px solid rgba(250, 204, 21, 0.3); border-radius: 8px;
    color: white; font-family: monospace; text-align: center;
    margin-bottom: 5px; outline: none; transition: all 0.3s;
}
.auth-box input:hover { border-color: rgba(250, 204, 21, 0.5); box-shadow: 0 0 15px rgba(250, 204, 21, 0.15); }
.auth-box input:focus { border-color: var(--primary-color); box-shadow: 0 0 20px rgba(250, 204, 21, 0.3); }

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: color 0.2s;
}
.btn-icon:hover { color: white; }

.main-layout {
    display: flex;
    gap: 20px;
    flex: 1;
    min-height: 0;
}

/* Removed duplicate panel styles */
.upload-area {
    flex: 1;
    border: 2px dashed rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: rgba(0,0,0,0.2);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}
.upload-area:hover {
    border-color: rgba(250, 204, 21, 0.6);
    box-shadow: inset 0 0 20px rgba(250, 204, 21, 0.05), 0 0 15px rgba(250, 204, 21, 0.1);
    transform: translateY(-2px);
}
.upload-area.dragover { 
    border-color: var(--primary-color); 
    background: rgba(250, 204, 21, 0.05); 
    box-shadow: inset 0 0 30px rgba(250, 204, 21, 0.1), 0 0 20px rgba(250, 204, 21, 0.2);
}

.upload-placeholder {
    text-align: center;
    color: var(--text-secondary);
    pointer-events: none;
}
.upload-placeholder i { font-size: 48px; margin-bottom: 12px; opacity: 0.7;}
.upload-placeholder span { font-size: 12px; opacity: 0.6; display: block; margin-top: 8px;}

.image-preview-container {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    padding: 10px;
}
#imagePreview { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px;}

.action-buttons { display: flex; gap: 10px; }

/* Left Panel */
.left-panel { flex: 1; min-height: 0; padding: 25px; display: flex; flex-direction: column; overflow: hidden; border-top: 2px solid var(--primary-color);}
.left-panel h2 { border-bottom: 1px solid rgba(250, 204, 21, 0.2); padding-bottom: 12px; }

/* Right Panel */
.right-panel { flex: 1; min-height: 0; padding: 25px; display: flex; flex-direction: column; overflow: hidden; border-top: 2px solid var(--primary-color);}
.right-panel h2 { border-bottom: 1px solid rgba(250, 204, 21, 0.2); padding-bottom: 12px; margin-bottom: 15px;}
.analysis-section { margin-bottom: 20px; flex: 0 0 auto; }

#promptArea {
    width: 100%; height: 100px;
    background: rgba(0,0,0,0.3); border: 1px solid var(--panel-border);
    border-radius: 8px; color: var(--text-primary);
    padding: 12px; font-family: monospace; font-size: 14px;
    resize: none; outline: none; transition: all 0.3s ease;
}
#promptArea:hover { border-color: rgba(250, 204, 21, 0.5); box-shadow: 0 0 15px rgba(250, 204, 21, 0.1); }
#promptArea:focus { border-color: var(--primary-color); box-shadow: 0 0 20px rgba(250, 204, 21, 0.25); }

/* Removed logs-section styles */

.output-section { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0;}
.output-preview {
    flex: 1; background: rgba(0,0,0,0.3); border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary); overflow: hidden; position: relative;
    border: 1px solid var(--panel-border);
}
#generatedImage { max-width: 100%; max-height: 100%; object-fit: contain; }

.bottom-actions { display: flex; flex-direction: column; gap: 15px;}
.main-buttons { display: flex; gap: 10px; }
.main-buttons .btn { flex: 1; height: 45px; font-size: 15px;}

/* Overlay Loaders & Actions */
.loading-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    color: var(--primary-color);
    z-index: 10;
    border-radius: inherit;
}
.loading-overlay i { font-size: 40px; margin-bottom: 15px; }
.loading-overlay p { color: white; font-weight: 500; }

.image-overlay-actions {
    position: absolute;
    top: 15px; right: 15px;
    display: flex; gap: 10px;
    z-index: 5;
}
.btn-icon {
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(0,0,0,0.6); color: white;
    border: 1px solid rgba(255,255,255,0.2);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s ease;
}
.btn-icon:hover { background: rgba(0,0,0,0.9); transform: scale(1.1); border-color: white;}


/* Modals */
.modal {
    display: none; position: fixed; z-index: 100; left: 0; top: 0;
    width: 100%; height: 100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    align-items: center; justify-content: center;
}
.modal-content {
    background: var(--bg-dark); width: 400px; padding: 25px; border-radius: 16px;
    position: relative; border: 1px solid rgba(255,255,255,0.1);
}
.crop-modal-content {
    width: 800px; max-width: 90vw; height: 80vh; display: flex; flex-direction: column;
}

.close-modal {
    position: absolute; right: 20px; top: 15px; font-size: 24px; color: var(--text-secondary);
    cursor: pointer;
}
.form-group { margin-bottom: 15px;}
.form-group label { display: block; margin-bottom: 8px; font-size: 13px; color: var(--text-secondary);}
.form-group input {
    width: 100%; padding: 10px; background: rgba(0,0,0,0.3); border: 1px solid var(--panel-border);
    border-radius: 6px; color: white; outline: none;
}
.form-group input:focus { border-color: var(--primary-color); }

.crop-container { flex: 1; background: #111; overflow: hidden; border-radius: 8px; margin-bottom: 15px; display: flex; justify-content: center; align-items: center;}
.crop-container img { max-width: 100%; max-height: 100%; display: block;}
.crop-actions { display: flex; gap: 10px; justify-content: flex-end;}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); }

/* Responsive */
@media (max-width: 992px) {
    .main-layout { flex-direction: column; height: auto; }
    .app-container { height: auto; }
}
