/* Custom CSS Variables */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Global Styles */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* Modal styles */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.image-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
}

.image-modal img {
    width: 100%;
    height: auto;
    max-height: 90vh;
    object-fit: contain;
}

.image-modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.image-modal-close:hover {
    color: #bbb;
}

/* Countdown overlay styles */
.countdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.countdown-content {
    text-align: center;
    color: white;
}

.countdown-number {
    font-size: 8rem;
    font-weight: bold;
    margin: 0;
    animation: pulse 1s ease-in-out;
}

.countdown-message {
    font-size: 2rem;
    margin-top: 1rem;
    animation: fadeIn 1s ease-in-out;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hidden-by-countdown { 
    display: none; 
}

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

/* Custom Button Styles */
.btn-gradient {
    background: var(--primary-gradient);
    border: none;
    color: white;
    transition: var(--transition);
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

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

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

/* Custom Form Styles */
.form-control:focus {
    border-color: #764ba2;
    box-shadow: 0 0 0 0.2rem rgba(118, 75, 162, 0.25);
}

/* Custom Alert Styles */
.alert {
    border-radius: 8px;
    border: none;
    box-shadow: var(--box-shadow);
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #764ba2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Typography */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    .display-4 { font-size: 2.5rem; }
}

/* Custom Badge Styles */
.badge-gradient {
    background: var(--primary-gradient);
    color: white;
    padding: 0.5em 1em;
    border-radius: 20px;
}

/* Custom Table Styles */
.table-custom {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

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

.table-custom th,
.table-custom td {
    padding: 1rem;
}

/* Custom Modal Styles */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: var(--box-shadow);
}

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

.modal-footer {
    border-top: 1px solid #dee2e6;
}

/* Custom Pagination */
.pagination .page-link {
    color: #764ba2;
    border: none;
    margin: 0 2px;
    border-radius: 4px;
}

.pagination .page-item.active .page-link {
    background: var(--primary-gradient);
    color: white;
}

/* Custom Tooltip */
.tooltip-inner {
    background: var(--primary-gradient);
    border-radius: 4px;
    padding: 8px 12px;
}

.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: #764ba2;
}

/* Custom Progress Bar */
.progress {
    height: 8px;
    border-radius: 4px;
    background-color: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    background: var(--primary-gradient);
    transition: width 0.6s ease;
}

/* Custom Switch */
.form-switch .form-check-input:checked {
    background-color: #764ba2;
    border-color: #764ba2;
}

/* Custom Radio and Checkbox */
.form-check-input:checked {
    background-color: #764ba2;
    border-color: #764ba2;
}

/* Custom Select */
.form-select:focus {
    border-color: #764ba2;
    box-shadow: 0 0 0 0.2rem rgba(118, 75, 162, 0.25);
}

/* Custom File Input */
.form-control[type="file"]:focus {
    border-color: #764ba2;
    box-shadow: 0 0 0 0.2rem rgba(118, 75, 162, 0.25);
}

/* Floating Action Buttons */
.btn-floating {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    padding: 0;
    margin: 0 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border: none;
}

.btn-floating i {
    font-size: 1rem;
    line-height: 1;
}

.btn-floating.btn-primary {
    background: #0d6efd;
    color: white;
}

.btn-floating.btn-primary:hover {
    background: #0b5ed7;
    opacity: 0.9;
}

.btn-floating.btn-secondary {
    background: #f44336;
    color: white;
}

.btn-floating.btn-secondary:hover {
    background: #d32f2f;
    opacity: 0.9;
}

.btn-floating.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-floating.btn-danger:hover {
    background: #bb2d3b;
    opacity: 0.9;
}

.actions-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

/* Countdown overlay styles */
.countdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.countdown-content {
    text-align: center;
    color: white;
}

.countdown-number {
    font-size: 8rem;
    font-weight: bold;
    margin: 0;
    animation: pulse 1s ease-in-out;
}

.countdown-message {
    font-size: 2rem;
    margin-top: 1rem;
    animation: fadeIn 1s ease-in-out;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Question card styles */
.question-card {
    margin-bottom: 1.5rem;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
}

.question-card .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

/* Timer styles */
.timer {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background-color: #6f42c1;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 1.2rem;
    z-index: 1000;
}

/* Choice styles */
.choice-label {
    display: block;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

.choice-label:hover {
    background-color: #f8f9fa;
}

.choice-input:checked + .choice-label {
    background-color: #e9ecef;
    border-color: #6f42c1;
}

/* Question layout styles */
.question-content {
    display: flex !important;
    flex-direction: row !important;
    gap: 1rem !important;
    align-items: flex-start !important;
    width: 100% !important;
    margin-bottom: 1rem !important;
}

.question-text {
    flex: 1 !important;
    min-width: 0 !important;
    max-width: 50% !important;
    display: flex !important;
    flex-direction: column !important;
}

.question-image-container {
    flex: 0 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: flex-end !important;
    position: relative !important;
    align-self: flex-start !important;
    margin-top: 0 !important;
    width: auto !important;
    height: auto !important;
}

.question-image {
    display: none !important;
}

.question-image:hover {
    opacity: 0.8 !important;
}

.show-image-btn {
    display: inline-block !important;
    width: auto !important;
    padding: 0.25rem 0.5rem !important;
    background-color: #007bff !important;
    color: white !important;
    border: 1px solid #007bff !important;
    border-radius: 0.25rem !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: background-color 0.2s !important;
    text-decoration: none !important;
    z-index: 10 !important;
    position: relative !important;
    white-space: nowrap !important;
}

.show-image-btn:hover {
    background-color: #0056b3 !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .question-content {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    
    .question-text {
        max-width: 100% !important;
        order: 1 !important;
    }
    
    .question-image-container {
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        order: 0 !important;
        margin-bottom: 1rem !important;
        border: 2px solid #28a745 !important;
    }
    
    .question-image {
        display: none !important;
    }
    
    .show-image-btn {
        display: block !important;
        width: 100% !important;
        padding: 0.5rem !important;
        background-color: #007bff !important;
        color: white !important;
        border: none !important;
        border-radius: 0.25rem !important;
    }
} 