/* Saint John Paul 2 College LMS - Custom Styles */

: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;
    --gold-color: #ffd700;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

.main-content {
    padding: 20px 0;
    max-width: 1200px;
    margin: 0 auto;
}

/* Container improvements for better spacing */
.container, .container-fluid {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* Cards and Panels */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    transition: transform 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), #084298);
    color: white;
    border-radius: 10px 10px 0 0 !important;
    border: none;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #084298);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #146c43);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #b02a37);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #cc9a00);
    border: none;
    color: #000;
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
    font-size: 1.3rem;
    padding: 0.5rem 0;
}

.navbar-logo {
    height: 40px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    transition: all 0.2s ease-in-out;
}

.navbar-logo:hover {
    transform: scale(1.05);
}

/* Responsive logo sizing */
@media (max-width: 768px) {
    .navbar-logo {
        height: 35px;
        max-width: 150px;
    }
}

@media (max-width: 576px) {
    .navbar-logo {
        height: 30px;
        max-width: 120px;
    }
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255,255,255,0.1);
    border-radius: 5px;
}

/* Forms - Global styling for all pages */
.form-control, .form-select {
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    padding: 0.75rem !important;
    background: white !important;
    transition: all 0.2s ease-in-out !important;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25) !important;
    outline: none !important;
}

/* Textarea specific styling */
textarea.form-control {
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    min-height: 100px;
    resize: vertical;
    padding: 0.75rem !important;
    background: white !important;
}

textarea.form-control:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25) !important;
    outline: none !important;
}

/* Input types - ensure all have visible borders */
input[type="text"], 
input[type="email"], 
input[type="password"], 
input[type="number"], 
input[type="tel"], 
input[type="url"], 
input[type="search"], 
input[type="date"], 
input[type="time"], 
input[type="datetime-local"], 
input[type="month"], 
input[type="week"],
select,
textarea {
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    padding: 0.75rem !important;
    background: white !important;
    transition: all 0.2s ease-in-out !important;
}

input[type="text"]:focus, 
input[type="email"]:focus, 
input[type="password"]:focus, 
input[type="number"]:focus, 
input[type="tel"]:focus, 
input[type="url"]:focus, 
input[type="search"]:focus, 
input[type="date"]:focus, 
input[type="time"]:focus, 
input[type="datetime-local"]:focus, 
input[type="month"]:focus, 
input[type="week"]:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25) !important;
    outline: none !important;
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
}

/* Dashboard Cards */
.stats-card {
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease-in-out;
}

.stats-card:hover {
    border-left-width: 8px;
    transform: translateX(5px);
}

.stats-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
}

/* Course Cards */
.course-card {
    height: 100%;
    transition: all 0.3s ease-in-out;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.course-image {
    height: 200px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
}

.course-progress {
    height: 8px;
    border-radius: 4px;
}

/* Quiz and Assignment Styles */
.question-card {
    border-left: 4px solid var(--info-color);
}

.answer-option {
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    padding: 10px;
    border-radius: 5px;
}

.answer-option:hover {
    background-color: var(--light-color);
}

.answer-option.selected {
    background-color: var(--primary-color);
    color: white;
}

.answer-option.correct {
    background-color: var(--success-color);
    color: white;
}

.answer-option.incorrect {
    background-color: var(--danger-color);
    color: white;
}

/* Login/Register Styles */
.login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="0.5" fill="%23ffffff" opacity="0.1"/><circle cx="20" cy="20" r="0.3" fill="%23ffffff" opacity="0.1"/><circle cx="80" cy="30" r="0.4" fill="%23ffffff" opacity="0.1"/><circle cx="30" cy="80" r="0.2" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(1deg); }
    66% { transform: translateY(5px) rotate(-1deg); }
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    padding: 2.5rem;
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo-img {
    max-height: 60px;
    width: auto;
    max-width: 280px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
}

.login-logo-img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.15));
}

.text-primary-gradient {
    background: linear-gradient(135deg, var(--primary-color), #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

/* Enhanced form styling */
.form-control {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    transform: translateY(-2px);
}

/* Login page specific form styling - overrides global for login only */
.login-container .form-control {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 12px !important;
    padding: 0.85rem 1rem !important;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
}

.login-container .form-control:focus {
    background: white !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25) !important;
    transform: translateY(-2px) !important;
}

.form-label {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    padding: 0.85rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

/* Demo buttons styling */
.btn-outline-primary, .btn-outline-success, .btn-outline-info, .btn-outline-warning {
    border-radius: 8px;
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

.btn-outline-success:hover {
    background: var(--success-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(25, 135, 84, 0.3);
}

.btn-outline-info:hover {
    background: var(--info-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(13, 202, 240, 0.3);
}

.btn-outline-warning:hover {
    background: var(--warning-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.3);
}

/* Password toggle button */
.input-group .btn-outline-secondary {
    border-radius: 0 12px 12px 0;
    border-left: none;
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Alert styling */
.alert {
    border-radius: 12px;
    border: none;
    backdrop-filter: blur(10px);
}

.alert-success {
    background: rgba(25, 135, 84, 0.1);
    color: #0f5132;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #721c24;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #664d03;
}

.alert-info {
    background: rgba(13, 202, 240, 0.1);
    color: #055160;
}

/* Links */
a {
    color: var(--primary-color);
    transition: all 0.3s ease;
}

a:hover {
    color: #764ba2;
    transform: translateY(-1px);
}

/* Animation classes */
.fade-in {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .login-card {
        margin: 1rem;
        padding: 2rem 1.5rem;
    }
    
    .login-logo-img {
        max-height: 50px;
        max-width: 240px;
    }
    
    .text-primary-gradient {
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .login-card {
        margin: 0.5rem;
        padding: 1.5rem 1rem;
    }
    
    .login-logo-img {
        max-height: 45px;
        max-width: 200px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container, .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .main-content {
        padding: 15px 0;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .stats-icon {
        font-size: 2rem;
    }
}

@media (min-width: 1400px) {
    .container, .container-fluid {
        max-width: 1320px;
    }
    
    .main-content {
        max-width: 1320px;
    }
}
