/* Custom CSS for Training Academy */

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
}

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

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

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

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

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

.btn-primary {
    background: var(--primary-gradient);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Level Badge */
.level-badge {
    display: flex;
    align-items: center;
}

/* Stat Cards */
.stat-card {
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

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

/* Progress Bars */
.progress {
    border-radius: 10px;
    overflow: hidden;
}

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

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
}

/* Tables */
.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead {
    background: #f8f9fa;
}

.table-hover tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
    cursor: pointer;
}

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

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* Pulse Animation for notifications */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Screensaver */
.screensaver {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.screensaver-content {
    text-align: center;
    animation: fadeIn 1s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1rem;
    }
    
    .persona-carousel {
        padding: 10px 0;
    }
    
    .podium-container {
        flex-direction: column;
        align-items: center;
    }
    
    .session-main {
        flex-direction: column;
    }
    
    .goals-sidebar {
        width: 100%;
        max-height: 300px;
    }
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Modal Enhancements */
.modal-content {
    border-radius: 15px;
    border: none;
}

.modal-header {
    background: var(--primary-gradient);
    color: white;
    border-radius: 15px 15px 0 0;
}

/* Form Enhancements */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Achievement Display */
.achievement-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: inline-block;
    animation: pulse 2s infinite;
}

/* XP Gain Animation */
.xp-gain {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--warning-color);
    color: black;
    padding: 15px 25px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 5px 20px rgba(255, 193, 7, 0.5);
    z-index: 1000;
    animation: slideInUp 0.5s ease, pulse 1s ease 0.5s;
}

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

/* Level Up Notification */
.level-up-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.3);
    z-index: 9999;
    text-align: center;
    animation: zoomIn 0.5s ease;
}

@keyframes zoomIn {
    from {
        transform: translate(-50%, -50%) scale(0);
    }
    to {
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
}

/* Utility Classes */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--primary-gradient);
}

.shadow-lg-hover:hover {
    box-shadow: 0 1rem 3rem rgba(0,0,0,.175)!important;
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .screensaver {
        display: none;
    }
    
    .card {
        page-break-inside: avoid;
    }
}
/* Mobile Responsive Styles */
@media (max-width: 768px) {
    /* Session container adjustments */
    .session-container {
        height: auto;
        min-height: 100vh;
    }
    
    /* Stack sidebar and conversation vertically on mobile */
    .session-main {
        flex-direction: column;
        overflow-y: auto;
    }
    
    /* Goals sidebar takes full width on mobile */
    .goals-sidebar {
        width: 100%;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid #dee2e6;
    }
    
    /* Conversation area adjustments */
    .conversation-area {
        min-height: 60vh;
    }
    
    /* Smaller padding for mobile */
    .session-header {
        padding: 15px;
        font-size: 0.9rem;
    }
    
    /* Session info box - stack vertically */
    .session-main .conversation-area .p-3 .row {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .session-main .conversation-area .p-3 .col-4 {
        width: 100%;
        text-align: left !important;
        padding: 10px;
        background: #f8f9fa;
        border-radius: 5px;
    }
    
    /* Message bubbles - allow more width on mobile */
    .message-bubble {
        max-width: 85%;
    }
    
    /* Transcript container */
    .transcript-container {
        padding: 15px;
        max-height: none;
    }
    
    /* Button groups - full width */
    .goals-sidebar .d-grid {
        gap: 10px;
    }
    
    .goals-sidebar .btn {
        font-size: 0.9rem;
        padding: 10px 15px;
    }
    
    /* Goal items - smaller on mobile */
    .goal-item {
        font-size: 0.9rem;
        padding: 10px;
    }
    
    /* ElevenLabs widget container */
    .conversation-area > .p-3 {
        padding: 15px !important;
        min-height: 150px !important;
    }
    
    /* Modal adjustments */
    .modal-dialog {
        margin: 10px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    /* Smaller text on mobile */
    body {
        font-size: 14px;
    }
    
    h5 {
        font-size: 1.1rem;
    }
    
    h6 {
        font-size: 1rem;
    }
    
    /* Navbar brand smaller */
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    /* Card adjustments */
    .card {
        margin-bottom: 15px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    /* Toast notifications - position better on mobile */
    .toast-container {
        top: 60px;
        right: 10px;
        left: 10px;
    }
    
    /* XP gain notification */
    .xp-gain {
        bottom: 10px;
        right: 10px;
        left: 10px;
        text-align: center;
        font-size: 1rem;
        padding: 12px 20px;
    }
    
    /* Level up notification */
    .level-up-notification {
        width: 90%;
        max-width: 400px;
        padding: 30px 20px;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .session-header {
        padding: 10px;
        font-size: 0.85rem;
    }
    
    .message-bubble {
        max-width: 90%;
        padding: 10px 14px;
        font-size: 0.9rem;
    }
    
    .btn {
        font-size: 0.85rem;
        padding: 8px 15px;
    }
    
    .goals-sidebar .btn {
        font-size: 0.85rem;
        padding: 8px 12px;
    }
    
    .modal-title {
        font-size: 1rem;
    }
    
    .level-up-notification {
        padding: 20px 15px;
    }
    
    .level-up-notification i {
        font-size: 3.5rem !important;
    }
    
    .level-up-notification h2 {
        font-size: 1.5rem;
    }
}