/* Custom Styles for SuperAiNote */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #0d6efd 0%, #0dcaf0 100%);
    min-height: 60vh;
}

.min-vh-50 {
    min-height: 50vh;
}

.bg-gradient {
    background: linear-gradient(135deg, #0d6efd 0%, #0dcaf0 100%);
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.btn {
    border-radius: 5px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Forms */
.form-control {
    border-radius: 5px;
    border: 1px solid #dee2e6;
    padding: 10px 15px;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-card {
    max-width: 450px;
    width: 100%;
}

/* Dashboard */
.sidebar {
    min-height: calc(100vh - 56px);
    background-color: #343a40;
    color: white;
    transition: all 0.3s ease;
}

@media (max-width: 767.98px) {
    .sidebar {
        position: fixed;
        top: 56px;
        left: 0;
        z-index: 1000;
        width: 250px;
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link i {
    margin-right: 10px;
    width: 20px;
}

/* Collapsible submenu styles */
.sidebar .nav-link[data-bs-toggle="collapse"] {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar .nav-link[data-bs-toggle="collapse"] .fa-chevron-down {
    transition: transform 0.3s ease;
    font-size: 0.75rem;
    margin-right: 0;
    margin-left: auto;
}

.sidebar .nav-link[data-bs-toggle="collapse"][aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

/* Nested submenu items */
.sidebar .nav .nav {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    margin-top: 5px;
    margin-bottom: 5px;
}

.sidebar .nav .nav .nav-link {
    padding: 10px 20px 10px 40px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.sidebar .nav .nav .nav-link:hover,
.sidebar .nav .nav .nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.15);
    padding-left: 45px;
}

.sidebar .nav .nav .nav-link i {
    font-size: 0.85rem;
    width: 18px;
}

/* Note Card */
.note-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.note-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.note-preview {
    max-height: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Quiz Card */
.quiz-card {
    border-left: 4px solid var(--primary-color);
}

.question-option {
    cursor: pointer;
    padding: 15px;
    border: 2px solid #dee2e6;
    border-radius: 5px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.question-option:hover {
    border-color: var(--primary-color);
    background-color: rgba(13, 110, 253, 0.05);
}

.question-option.selected {
    border-color: var(--primary-color);
    background-color: rgba(13, 110, 253, 0.1);
}

.question-option.correct {
    border-color: var(--success-color);
    background-color: rgba(25, 135, 84, 0.1);
}

.question-option.incorrect {
    border-color: var(--danger-color);
    background-color: rgba(220, 53, 69, 0.1);
}

/* Avatar */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-lg {
    width: 80px;
    height: 80px;
}

/* Badge */
.badge {
    padding: 5px 10px;
    border-radius: 5px;
}

/* Alerts */
.alert {
    border-radius: 5px;
    border: none;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* Editor */
.editor-container {
    min-height: 300px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 15px;
}

/* Chat Interface */
.chat-container {
    height: calc(100vh - 200px);
    overflow-y: auto;
}

.chat-message {
    padding: 10px 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    max-width: 70%;
}

.chat-message.user {
    background-color: var(--primary-color);
    color: white;
    margin-left: auto;
}

.chat-message.ai {
    background-color: #e9ecef;
    color: var(--dark-color);
}

/* Progress Bar */
.progress {
    height: 25px;
    border-radius: 5px;
}

.progress-bar {
    border-radius: 5px;
}

/* Footer */
footer a {
    text-decoration: none;
    transition: opacity 0.3s ease;
}

footer a:hover {
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .sidebar {
        min-height: auto;
    }
    
    .chat-message {
        max-width: 90%;
    }
}

/* Utilities */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shadow-sm {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.shadow-md {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.shadow-lg {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* Quick Action Cards */
.quick-action-card {
    transition: all 0.3s ease;
}

.quick-action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
