/* Custom styles for SlidoClone */

/* Global styles */
:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --light-gray: #f8f9fa;
    --border-radius: 0.375rem;
}

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

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

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Question and Poll Items */
.question-item, .poll-item {
    transition: all 0.2s ease-in-out;
}

.question-item:hover, .poll-item:hover {
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.question-item.bg-light {
    background-color: #f8f9fa !important;
    border-color: var(--success-color) !important;
}

/* Upvote button animation */
.upvote-btn {
    transition: all 0.2s ease-in-out;
}

.upvote-btn:hover {
    transform: scale(1.05);
}

.upvote-btn.upvoted {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Poll options */
.poll-option {
    transition: all 0.2s ease-in-out;
}

.poll-option:hover {
    transform: translateX(5px);
}

.poll-option:disabled {
    opacity: 0.7;
}

/* Rating stars */
.rating-btn {
    border: none;
    background: transparent;
    padding: 0.25rem;
    margin: 0 0.1rem;
}

.rating-btn .fas.fa-star,
.rating-btn .far.fa-star {
    font-size: 1.5rem;
}

/* Word cloud display */
#word-cloud-display .badge {
    font-size: 0.9rem;
    margin: 0.2rem;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* Connection status */
#connection-status {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 1050;
}

/* Event code styling */
.event-code-display {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 2px;
}

/* Form enhancements */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Responsive improvements */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-group-vertical .btn {
        margin-bottom: 0.5rem;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-grow-sm {
    width: 1rem;
    height: 1rem;
}

/* Feature icons on home page */
.feature-icon {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Toast improvements */
.toast {
    border: none;
    border-radius: var(--border-radius);
}

/* Badge improvements */
.badge {
    font-weight: 500;
}

/* Button improvements */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

/* Modal improvements */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Input group improvements */
.input-group .form-control:not(:last-child) {
    border-right: none;
}

.input-group .btn {
    border-left: none;
}

/* Alert improvements */
.alert {
    border: none;
    border-radius: var(--border-radius);
}

/* Table improvements */
.table {
    border-radius: var(--border-radius);
    overflow: hidden;
}

/* Progress bar for polls */
.poll-progress {
    height: 1.5rem;
    background-color: #e9ecef;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.poll-progress-bar {
    background-color: var(--primary-color);
    height: 100%;
    transition: width 0.3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 500;
}

/* Real-time update indicators */
.new-item {
    animation: highlight 2s ease-in-out;
}

@keyframes highlight {
    0% { background-color: #fff3cd; }
    100% { background-color: transparent; }
}

/* Utility classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.border-start-primary {
    border-left: 4px solid var(--primary-color) !important;
}

.border-start-success {
    border-left: 4px solid var(--success-color) !important;
}

/* Print styles */
@media print {
    .navbar, .btn, .modal, #connection-status {
        display: none !important;
    }
    
    .card {
        border: 1px solid #dee2e6 !important;
        box-shadow: none !important;
    }
}