/**
 * Student Board Styles - Complete
 * Matching the design mockup provided
 */

.tuturn-student-board-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ========== HEADER ========== */
.board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.board-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: #E8F5E9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info h2 {
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
}

.board-subtitle {
    margin: 0;
    color: #7f8c8d;
    font-size: 14px;
}

.btn-add-widget {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-add-widget:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

/* ========== MAIN CONTENT GRID ========== */
.board-main-content {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
}

/* ========== LEFT SIDEBAR ========== */
.board-sidebar {
    background: #fff;
    border-radius: 12px;
    padding: 20px 10px;
    height: fit-content;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.board-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.board-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: #5f6368;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.board-nav-item:hover {
    background: #f5f5f5;
    color: #2c3e50;
}

.board-nav-item.active {
    background: #E8F5E9;
    color: #4CAF50;
}

.board-nav-item .icon {
    font-size: 18px;
}

/* ========== CENTER BOARD ========== */
.board-center {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.board-section-title {
    margin: 0 0 5px 0;
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
}

.board-section-subtitle {
    margin: 0 0 20px 0;
    color: #7f8c8d;
    font-size: 13px;
}

/* ========== WIDGETS GRID ========== */
.board-widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.board-widget {
    background: #2c3e50;
    border-radius: 12px;
    padding: 16px;
    min-height: 180px;
    position: relative;
    cursor: move;
    transition: all 0.3s ease;
}

.board-widget:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.board-widget.widget-notes {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.board-widget.widget-quick-access {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.board-widget.widget-add-placeholder {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.widget-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.widget-actions {
    display: flex;
    gap: 8px;
}

.widget-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.widget-btn:hover {
    background: rgba(255,255,255,0.3);
}

.widget-content {
    color: #fff;
}

.widget-notes-input {
    width: 100%;
    min-height: 100px;
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 8px;
    padding: 12px;
    color: #fff;
    resize: vertical;
    font-family: inherit;
}

.widget-notes-input::placeholder {
    color: rgba(255,255,255,0.6);
}

.quick-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.quick-link:hover {
    background: rgba(255,255,255,0.25);
    transform: translateX(4px);
}

.add-widget-btn {
    background: transparent;
    border: none;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    color: #adb5bd;
    transition: all 0.3s;
}

.add-widget-btn:hover {
    color: #495057;
}

.add-widget-btn .icon {
    font-size: 32px;
}

/* ========== QUOTE SECTION ========== */
.board-quote-section {
    margin: 30px 0;
}

.quote-box {
    background: linear-gradient(135deg, #FFD89B 0%, #19547B 100%);
    border-radius: 12px;
    padding: 24px;
    color: #fff;
}

.quote-box h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    opacity: 0.9;
}

.quote-text {
    margin: 0;
    font-size: 18px;
    line-height: 1.6;
    font-style: italic;
}

/* ========== CLASSES SECTION ========== */
.board-classes-section {
    margin-top: 30px;
}

.section-title {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.class-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.class-image {
    width: 100%;
    height: 140px;
    background-size: cover;
    background-position: center;
}

.class-image-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.class-info {
    padding: 16px;
}

.class-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.class-tutor {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: #7f8c8d;
}

.class-join-btn {
    width: 100%;
    padding: 10px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.class-join-btn:hover {
    background: #45a049;
}

/* ========== RIGHT SIDEBAR ========== */
.board-right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.board-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.card-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.card-subtitle {
    margin: 0 0 16px 0;
    font-size: 12px;
    color: #7f8c8d;
}

/* ========== ALERTS ========== */
.alerts-card {
    background: #FFE5E5;
}

.alerts-list {
    margin-bottom: 12px;
}

.alert-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 12px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 3px solid #e74c3c;
}

.alert-item.priority-high {
    border-left-color: #e74c3c;
}

.alert-item.priority-normal {
    border-left-color: #f39c12;
}

.alert-item.priority-low {
    border-left-color: #3498db;
}

.alert-content {
    flex: 1;
}

.alert-text {
    margin: 0 0 4px 0;
    font-size: 13px;
    color: #2c3e50;
    line-height: 1.4;
}

.alert-date {
    font-size: 11px;
    color: #95a5a6;
}

.alert-remove {
    background: none;
    border: none;
    color: #95a5a6;
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.alert-remove:hover {
    color: #e74c3c;
}

.btn-add-alert {
    width: 100%;
    padding: 8px;
    background: #fff;
    border: 1px dashed #dee2e6;
    border-radius: 8px;
    color: #6c757d;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-alert:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.no-alerts {
    padding: 12px;
    text-align: center;
    color: #7f8c8d;
    font-size: 13px;
}

/* ========== EXAM TIMER ========== */
.exam-timer-content {
    text-align: center;
}

.timer-display {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    font-family: 'Courier New', monospace;
    margin-bottom: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.timer-controls {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.timer-btn {
    padding: 8px 16px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.timer-btn:hover {
    background: #45a049;
}

.timer-btn[data-action="pause"] {
    background: #f39c12;
}

.timer-btn[data-action="pause"]:hover {
    background: #e67e22;
}

.timer-btn[data-action="reset"] {
    background: #e74c3c;
}

.timer-btn[data-action="reset"]:hover {
    background: #c0392b;
}

/* ========== WEEK SCHEDULE ========== */
.week-schedule {
    margin-bottom: 16px;
}

.week-calendar {
    display: flex;
    justify-content: space-around;
    padding: 16px 0;
}

.day-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.day-dot:hover {
    transform: scale(1.1);
}

.day-dot.has-event {
    background: #4CAF50;
}

.day-dot.event-color-0.has-event {
    background: #e74c3c;
}

.day-dot.event-color-1.has-event {
    background: #3498db;
}

.day-dot.event-color-2.has-event {
    background: #f39c12;
}

.day-label {
    font-size: 12px;
    font-weight: 600;
    color: #7f8c8d;
}

.day-dot.has-event .day-label {
    color: #fff;
}

.btn-view-schedule {
    width: 100%;
    padding: 10px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    color: #495057;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-view-schedule:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

/* ========== MODAL ========== */
.tuturn-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #7f8c8d;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.modal-close:hover {
    color: #2c3e50;
}

.modal-body {
    padding: 20px;
}

.widget-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.widget-option {
    padding: 24px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.widget-option:hover {
    background: #E8F5E9;
    border-color: #4CAF50;
    transform: translateY(-4px);
}

.widget-option .icon {
    font-size: 32px;
}

.widget-option .label {
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
    .board-main-content {
        grid-template-columns: 1fr;
    }
    
    .board-sidebar,
    .board-right-sidebar {
        grid-column: 1;
    }
    
    .board-sidebar {
        margin-bottom: 20px;
    }
    
    .board-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .board-header {
        flex-direction: column;
        text-align: center;
    }
    
    .board-header-left {
        flex-direction: column;
    }
    
    .board-widgets-grid {
        grid-template-columns: 1fr;
    }
    
    .classes-grid {
        grid-template-columns: 1fr;
    }
}

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

.board-widget,
.board-card,
.class-card {
    animation: fadeIn 0.4s ease-out;
}

/* ========== DRAG AND DROP STATES ========== */
.draggable-widget.ui-sortable-helper {
    opacity: 0.8;
    transform: rotate(3deg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.board-widgets-grid.ui-sortable .ui-sortable-placeholder {
    background: #e9ecef;
    border: 2px dashed #adb5bd;
    border-radius: 12px;
    visibility: visible !important;
    height: 180px !important;
}
