/* 
 * Custom Stylesheet for PensaCard Platform
 * Focus on light blue, white, and clean aesthetics for study comfort.
 */

:root {
    --primary-color: #4a90e2;
    --primary-light: #e5f1ff;
    --primary-hover: #357abd;
    --bg-color: #f3f7fb;
    --card-border: rgba(74, 144, 226, 0.12);
    --text-color: #2b3d52;
    --text-light: #5f758e;
    --success-soft: #2ecc71;
    --danger-soft: #e74c3c;
    --body-font: 'Inter', sans-serif;
    --heading-font: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    font-family: var(--body-font);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .brand-logo {
    font-family: var(--heading-font);
    font-weight: 600;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: #c3d7eb;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a1c2df;
}

/* Navbar styles */
.navbar {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(74, 144, 226, 0.1);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.02);
}

.brand-logo {
    color: var(--primary-color) !important;
    font-weight: 700;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-logo-icon {
    display: inline-block;
    position: relative;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #357abd 100%);
    border-radius: 8px;
    color: #fff;
    text-align: center;
    line-height: 32px;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(74, 144, 226, 0.3);
}

/* Main Content Wrapper */
main {
    flex: 1;
}

/* Notebook Cards */
.notebook-card {
    background-color: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 6px rgba(74, 144, 226, 0.02);
    height: 100%;
}

.notebook-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(74, 144, 226, 0.08);
    border-color: rgba(74, 144, 226, 0.3);
}

.notebook-card .card-title {
    color: var(--text-color);
    font-weight: 600;
}

.notebook-card .card-description {
    color: var(--text-light);
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.7rem;
}

.badge-count {
    background-color: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* Hero Section */
.hero-section {
    background: radial-gradient(circle at 10% 20%, rgba(229, 241, 255, 0.6) 0%, rgba(255, 255, 255, 0) 90%);
    padding: 60px 0 40px 0;
    text-align: center;
}

.hero-title {
    color: var(--text-color);
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
}

.hero-title span {
    color: var(--primary-color);
}

.hero-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 15px auto 25px auto;
}

/* Search bar styling */
.search-wrapper {
    position: relative;
    max-width: 550px;
    margin: 0 auto;
}

.search-input {
    height: 55px;
    border-radius: 30px;
    border: 1px solid rgba(74, 144, 226, 0.2);
    padding-left: 25px;
    padding-right: 55px;
    font-size: 1.05rem;
    box-shadow: 0 8px 24px rgba(74, 144, 226, 0.05);
    background-color: #ffffff;
    transition: all 0.3s ease;
}

.search-input:focus {
    box-shadow: 0 8px 30px rgba(74, 144, 226, 0.12);
    border-color: var(--primary-color);
    outline: none;
}

.search-icon-btn {
    position: absolute;
    right: 5px;
    top: 5px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background-color 0.2s;
}

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

/* Flashcard 3D structure */
.flashcard-container {
    perspective: 1200px;
    width: 100%;
    max-width: 700px;
    height: 450px;
    margin: 20px auto;
    cursor: pointer;
}

.flashcard {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.flashcard.flipped {
    transform: rotateY(180deg);
}

.flashcard-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 15px 40px rgba(74, 144, 226, 0.08), 0 2px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(74, 144, 226, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: #ffffff;
    overflow-y: auto;
}

.flashcard-front {
    background: linear-gradient(135deg, #ffffff 0%, #f6faff 100%);
    color: var(--text-color);
}

.flashcard-back {
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f2ff 100%);
    color: #1a2d42;
    transform: rotateY(180deg);
    border-color: rgba(74, 144, 226, 0.25);
}

.card-label {
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.card-text {
    font-size: 1.8rem;
    font-weight: 500;
    line-height: 1.4;
    margin: auto 0;
    font-family: var(--heading-font);
    word-break: break-word;
}

.card-hint {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 15px;
}

.card-image-preview {
    max-height: 180px;
    object-fit: contain;
    border-radius: 12px;
    margin: 15px auto;
    display: block;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Control Buttons during Study */
.study-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.btn-status-correct {
    background-color: #ffffff;
    color: var(--success-soft);
    border: 2px solid var(--success-soft);
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 30px;
    transition: all 0.2s;
    flex: 1;
}

.btn-status-correct:hover {
    background-color: var(--success-soft);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(46, 204, 113, 0.2);
}

.btn-status-incorrect {
    background-color: #ffffff;
    color: var(--danger-soft);
    border: 2px solid var(--danger-soft);
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 30px;
    transition: all 0.2s;
    flex: 1;
}

.btn-status-incorrect:hover {
    background-color: var(--danger-soft);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.2);
}

/* Observations section during study */
.notes-container {
    max-width: 700px;
    margin: 20px auto;
    background-color: #ffffff;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    padding: 20px;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.02);
}

/* UI details */
.card-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 700px;
    margin: 0 auto;
}

/* Custom Modals & Forms */
.modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 20px 50px rgba(74, 144, 226, 0.15);
}

.modal-header {
    border-bottom: 1px solid rgba(74, 144, 226, 0.08);
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.form-control, .form-select {
    border-radius: 10px;
    border: 1px solid rgba(74, 144, 226, 0.15);
    padding: 12px 18px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.1);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 20px;
    padding: 10px 24px;
    font-weight: 600;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* Performance Report stats */
.stats-number {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.stats-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    font-weight: 600;
}

/* Progress bar customization */
.progress {
    height: 8px;
    border-radius: 4px;
    background-color: rgba(74, 144, 226, 0.1);
}

.progress-bar {
    background-color: var(--primary-color);
    border-radius: 4px;
}

/* Custom Footer */
footer {
    background-color: #ffffff;
    border-top: 1px solid rgba(74, 144, 226, 0.08);
    padding: 20px 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Drag and Drop Zone */
.drop-zone {
    border: 2px dashed rgba(74, 144, 226, 0.3) !important;
    transition: all 0.2s ease;
    cursor: pointer;
    background-color: #fafcfe;
    border-radius: 12px;
}
.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--primary-color) !important;
    background-color: var(--primary-light) !important;
}

/* CKEditor overrides to match theme */
.ck-editor__editable_inline {
    min-height: 140px;
    border-bottom-left-radius: 10px !important;
    border-bottom-right-radius: 10px !important;
}
.ck-toolbar {
    border-top-left-radius: 10px !important;
    border-top-right-radius: 10px !important;
    background-color: #f7fafc !important;
    border-color: rgba(74, 144, 226, 0.15) !important;
}
.ck.ck-editor {
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.03);
}

/* Custom Category Select Truncation & Styling */
.custom-category-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    overflow: hidden;
    max-width: 100%;
    text-align: left;
}

.custom-select-trigger .selected-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    flex: 1;
    min-width: 0;
    margin-right: 6px;
}

.custom-select-options .dropdown-item {
    white-space: normal;
    word-break: break-word;
    font-size: 0.9rem;
    padding: 8px 14px;
}


