/**
 * CompatiBond - Modern UI Styles
 */

/* CSS Variables for Theme */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --card-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    --card-shadow-hover: 0 15px 50px rgba(0, 0, 0, 0.2);
    --border-radius: 1rem;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* General Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background-attachment: fixed;
}

main {
    flex: 1;
}

/* Modern Navbar */
.navbar {
    background: var(--primary-gradient) !important;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    transition: var(--transition);
}

.navbar-brand:hover {
    transform: scale(1.05);
}

/* Footer Styles */
.footer {
    margin-top: auto;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-top: none;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.footer p {
    color: rgba(255, 255, 255, 0.9);
}

/* Modern Card Styles */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    overflow: hidden;
    background: white;
}

.card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-5px);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 1.25rem 1.5rem;
}

.card-body {
    padding: 2rem;
}

/* Glassmorphism Effect */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Modern Button Styles */
.btn {
    transition: var(--transition);
    border-radius: 0.75rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--primary-gradient);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
}

.btn-success {
    background: var(--success-gradient);
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(79, 172, 254, 0.5);
}

.btn-danger {
    background: var(--secondary-gradient);
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(245, 87, 108, 0.5);
}

/* Session Card Styles */
.session-card {
    border-left: 4px solid #667eea;
    position: relative;
    transition: var(--transition);
}

.session-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(to bottom, #667eea, #764ba2);
    transition: height 0.3s ease;
}

.session-card:hover::before {
    height: 100%;
}

.session-card:hover {
    transform: translateX(5px);
    box-shadow: var(--card-shadow-hover);
}

/* Question Styles */
.question-card {
    margin-bottom: 1.5rem;
    border-left: 4px solid #667eea;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.question-card:hover {
    transform: translateX(8px);
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.2);
}

.question-number {
    display: inline-block;
    width: 45px;
    height: 45px;
    line-height: 45px;
    text-align: center;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50%;
    margin-right: 15px;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: var(--transition);
}

.question-card:hover .question-number {
    transform: scale(1.1) rotate(5deg);
}

/* Modern Form Controls */
.form-control, .form-select {
    border-radius: 0.75rem;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.15);
}

/* Radio and Checkbox Custom Styles */
.form-check-input {
    width: 1.5rem;
    height: 1.5rem;
    cursor: pointer;
    border: 2px solid #dee2e6;
    transition: var(--transition);
}

.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.form-check-label {
    cursor: pointer;
    margin-left: 0.5rem;
    transition: var(--transition);
}

.form-check:hover .form-check-label {
    color: #667eea;
}

/* Progress Bar */
.progress {
    height: 30px;
    border-radius: 1rem;
    background: #e9ecef;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.progress-bar {
    font-weight: 600;
    font-size: 0.875rem;
    background: var(--primary-gradient);
    transition: width 0.6s ease;
    position: relative;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Alert Styles */
.alert {
    border-radius: var(--border-radius);
    border-left-width: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Table Styles */
.table {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

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

.table th {
    background: transparent;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    border: none;
    padding: 1rem;
}

.table tbody tr {
    transition: var(--transition);
    border-bottom: 1px solid #f0f0f0;
}

.table tbody tr:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.05), transparent);
    transform: scale(1.01);
}

.table td {
    padding: 1rem;
    vertical-align: middle;
}

/* Badge Styles */
.badge {
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.badge.bg-success {
    background: var(--success-gradient) !important;
}

/* Section Header Styles */
.section-header {
    background: var(--primary-gradient);
    color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.section-icon {
    font-size: 1.8rem;
    margin-right: 0.75rem;
}

/* Score Card Styles */
.score-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.score-value {
    font-size: 3rem;
    font-weight: bold;
    line-height: 1;
}

/* Category Score Styles */
.category-score {
    border-left: 4px solid;
    transition: all 0.3s ease;
}

.category-score:hover {
    transform: translateX(5px);
}

.category-score.high-score {
    border-left-color: #28a745;
    background-color: rgba(40, 167, 69, 0.05);
}

.category-score.medium-score {
    border-left-color: #ffc107;
    background-color: rgba(255, 193, 7, 0.05);
}

.category-score.low-score {
    border-left-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.05);
}

/* Participant List Styles */
.participant-item {
    padding: 1rem;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.participant-item:hover {
    border-left-color: #0d6efd;
    background-color: #f8f9fa;
}

.participant-item.submitted {
    border-left-color: #28a745;
}

.participant-item.pending {
    border-left-color: #ffc107;
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

/* Form Control Focus */
.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
}

/* Custom Question Styles */
.custom-question {
    background-color: #fff3cd;
    border-left-color: #ffc107;
}

.custom-question-badge {
    background-color: #ffc107;
    color: #000;
}

/* Response Comparison Styles */
.response-match {
    background-color: rgba(40, 167, 69, 0.1);
    border-left: 3px solid #28a745;
}

.response-mismatch {
    background-color: rgba(220, 53, 69, 0.1);
    border-left: 3px solid #dc3545;
}

.response-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Enhanced Login Button Styling */
.login-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    border: none !important;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4) !important;
}

.login-btn:hover {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.6) !important;
}

.login-btn:active {
    transform: translateY(0px);
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.4) !important;
}

.login-btn i {
    font-size: 1.2rem;
    margin-right: 8px;
}

@media (max-width: 768px) {
    .response-comparison {
        grid-template-columns: 1fr;
    }
}

/* Token Display */
.token-display {
    font-family: 'Courier New', monospace;
    font-size: 1.25rem;
    letter-spacing: 2px;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    word-break: break-all;
}

/* Copy Button */
.copy-btn {
    position: relative;
}

.copy-btn.copied::after {
    content: "Copied!";
    position: absolute;
    top: -30px;
    right: 0;
    background-color: #28a745;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    animation: fadeOut 2s forwards;
}

@keyframes fadeOut {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; }
}

/* Navbar Brand */
.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

.navbar-brand i {
    color: #ff69b4;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .card-body {
        padding: 1.5rem;
    }
    
    .btn {
        padding: 0.65rem 1.25rem;
    }
}

@media (max-width: 576px) {
    .score-value {
        font-size: 2rem;
    }
    
    .question-number {
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 0.875rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* Modern Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.slide-in {
    animation: slideIn 0.6s ease-out;
}

/* Hover Effects */
.hover-lift {
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
}

/* Floating Animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background: rgba(102, 126, 234, 0.3);
    color: #333;
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}
