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

:root {
    --bg-color: #0f172a;
    --surface-color: rgba(30, 41, 59, 0.7);
    --surface-border: rgba(255, 255, 255, 0.1);
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #ec4899;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #10b981;
    --danger: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    background-image: radial-gradient(circle at top right, rgba(99, 102, 241, 0.15), transparent 40%),
                      radial-gradient(circle at bottom left, rgba(236, 72, 153, 0.15), transparent 40%);
}

/* Glassmorphism utilities */
.glass {
    background: var(--surface-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Sidebar */
.sidebar {
    width: 280px;
    height: 100vh;
    padding: 2rem;
    position: fixed;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    z-index: 10;
}

.brand {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    padding: 1rem;
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-item:hover, .nav-item.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

/* Main Content */
.main-content {
    margin-left: 280px;
    padding: 2rem;
    width: calc(100% - 280px);
    min-height: 100vh;
}

.section {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.section.active {
    display: block;
}

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

h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 600;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-control {
    width: 100%;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--surface-border);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: rgba(99, 102, 241, 0.1);
}

/* Cards & Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card {
    padding: 1.5rem;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.5);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Camera UI */
.camera-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 3/4;
    margin: 0 auto;
    border: 2px solid var(--surface-border);
}

.camera-guideline {
    position: absolute;
    top: 5%;
    left: 5%;
    width: 90%;
    height: 90%;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    z-index: 5;
}

.video-wrapper.crop-portrait .camera-guideline {
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.video-wrapper.crop-square .camera-guideline {
    border-color: rgba(236, 72, 153, 0.6);
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.2);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: auto;
    aspect-ratio: 1 / 1;
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-slots {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.photo-slot {
    padding: 1.5rem 1rem;
    text-align: center;
    border: 2px dashed var(--surface-border);
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    min-height: 260px;
}

.photo-slot.has-photo {
    border-style: solid;
    border-color: var(--success);
}

.photo-preview {
    width: 100%;
    object-fit: cover;
    border-radius: 8px;
    margin-top: 1rem;
    display: none;
}

.photo-slot[data-type*="Practical"] .photo-preview {
    aspect-ratio: 1 / 1;
}

.photo-slot[data-type*="Subjective"] .photo-preview,
.photo-slot[data-type*="Objective"] .photo-preview {
    aspect-ratio: 3 / 4;
}

.photo-slot.has-photo .photo-preview {
    display: block;
}

.photo-slot.has-photo .placeholder {
    display: none;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.student-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.back-btn {
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.back-btn:hover {
    color: var(--text-main);
}

/* Mobile-First Responsive Styles */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        flex-direction: row;
        justify-content: space-around;
        padding: 0.5rem;
        border-radius: 16px 16px 0 0;
        border-width: 1px 0 0 0;
        gap: 0;
        box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.3);
    }
    
    .brand {
        display: none;
    }
    
    .nav-menu {
        flex-direction: row;
        width: 100%;
        justify-content: space-around;
        gap: 0;
    }
    
    .nav-item {
        padding: 0.5rem;
        flex-direction: column;
        gap: 0.25rem;
        font-size: 0.75rem;
        align-items: center;
        flex: 1;
        text-align: center;
        border-radius: 8px;
    }
    
    .nav-item i {
        font-size: 1.2rem;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 1rem 1rem 5.5rem 1rem;
        min-height: calc(100vh - 60px);
    }
    
    h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .photo-slots {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .video-wrapper {
        position: sticky;
        top: 10px;
        z-index: 100;
        aspect-ratio: 3 / 4;
        max-width: 320px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
        margin-bottom: 1.5rem;
    }
    
    .student-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        text-align: center;
    }
    
    #download-btn {
        width: 100%;
    }
}

/* Card header action layout */
.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    width: 100%;
}

.card-actions {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

/* Icon Buttons */
.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.btn-icon.delete-btn-icon:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.btn-icon.edit-btn-icon:hover {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-color);
}

/* Danger Button */
.btn-danger {
    background: linear-gradient(135deg, var(--danger), #ff6b6b);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* Modal Styling */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-backdrop.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    width: 90%;
    max-width: 500px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-backdrop.active .modal-content {
    transform: translateY(0);
}

.modal-content.confirm-dialog {
    max-width: 400px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

/* Inline Edit styles for Trades */
.inline-edit-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--primary-color);
    color: var(--text-main);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 1.25rem;
    font-weight: 600;
    font-family: inherit;
}
.inline-edit-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

