/* 
    Fon Akıllı Yazar Portalı - Premium Design System
    Aesthetics: Dark Mode Friendly, Glassmorphism, Modern SaaS Style
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #6366f1;
    --primary-light: #eef2ff;
    --secondary: #64748b;
    --accent: #ff5e1f;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    
    --sidebar-w: 260px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Auth Pages */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top right, #eef2ff, #f8fafc);
    padding: 20px;
}

.auth-card {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
    border: 1px solid rgba(255,255,255,0.7);
    text-align: center;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: #1e293b;
}

.auth-logo span { color: var(--accent); }

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    background: #f8fafc;
    transition: var(--transition);
    font-family: inherit;
    font-size: 0.95rem;
}

.form-input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    outline: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
    width: 100%;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.error-msg {
    background: #fee2e2;
    color: var(--danger);
    padding: 12px;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    border: 1px solid #fecaca;
}

/* Layout */
.portal-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-w);
    background: #fff;
    border-right: 1px solid #e2e8f0;
    padding: 2rem 1.5rem;
    position: fixed;
    height: 100vh;
    transition: var(--transition);
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-w);
    padding: 2.5rem;
    background: var(--bg-main);
}

/* Dashboard Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: var(--transition);
}

.stat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.bg-blue { background: #eff6ff; color: #3b82f6; }
.bg-green { background: #ecfdf5; color: #10b981; }
.bg-purple { background: #f5f3ff; color: #8b5cf6; }

.stat-info .label { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.stat-info .value { font-size: 1.5rem; font-weight: 700; color: #1e293b; }

/* Question Editor Specifics */
.editor-card {
    background: #fff;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.smart-tools {
    display: flex;
    gap: 10px;
    margin-bottom: 1rem;
    background: #f1f5f9;
    padding: 10px;
    border-radius: 10px;
}

.tool-btn {
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
}

.tool-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.tool-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2); }

/* Geometry Board Styling */
.jxgbox { border-radius: 12px !important; border: 1px solid #e2e8f0 !important; }

/* Image Module Improvements */
#imagePreview {
    transition: var(--transition);
    cursor: pointer;
}

#imagePreview:hover {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

/* Tabs System */
.auth-tabs {
    display: flex;
    background: #f1f5f9;
    padding: 6px;
    border-radius: 14px;
    margin-bottom: 2.5rem;
    border: 1px solid #e2e8f0;
}

.auth-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-family: inherit;
    outline: none !important;
}

.auth-tab.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.auth-view {
    display: none !important;
    animation: authViewFadeIn 0.4s ease-out;
}

.auth-view.active {
    display: block !important;
}

@keyframes authViewFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Copilot AI Sidebar */
.copilot-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 3000;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(99, 102, 241, 0.2);
}

.copilot-sidebar.active { right: 0; }

.copilot-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copilot-body {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.copilot-message {
    padding: 1rem;
    border-radius: 12px;
    line-height: 1.5;
    font-size: 0.9rem;
    position: relative;
    animation: fadeIn 0.4s ease-out;
}

.copilot-message.ai {
    background: #f8fafc;
    border-left: 4px solid var(--primary);
    color: #334155;
}

.copilot-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
    font-weight: 500;
}

.copilot-footer {
    padding: 1.5rem;
    border-top: 1px solid #f1f5f9;
    background: #fff;
}

.copilot-btn-group {
    display: flex;
    gap: 10px;
}

/* Animations & Effects */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.loading-gradient {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
