/* Google-like minimalist styles for Alias game */

:root {
    --bs-primary: #1976d2;
    --bs-primary-rgb: 25, 118, 210;
    --bs-secondary: #757575;
    --bs-light: #f8f9fa;
    --bs-dark: #212529;
    --border-radius: 8px;
    --transition: all 0.2s ease;
}

/* Typography */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--bs-dark);
    background-color: #fafafa;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 400;
    color: var(--bs-dark);
}

.fw-normal {
    font-weight: 400 !important;
}

/* Layout */
.container {
    max-width: 900px;
}

/* Navigation */
.navbar {
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.1);
    backdrop-filter: saturate(180%) blur(20px);
}

.navbar-brand {
    font-size: 1.5rem;
    color: var(--bs-dark) !important;
    text-decoration: none;
}

/* Cards */
.card {
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.1);
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 2px 8px rgba(60, 64, 67, 0.15);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 500;
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    border: none;
    padding: 0.75rem 1.5rem;
}

.btn:focus {
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.25);
}

.btn-primary {
    background-color: var(--bs-primary);
    color: white;
}

.btn-primary:hover {
    background-color: #1565c0;
    transform: translateY(-1px);
}

.btn-outline-primary {
    border: 2px solid var(--bs-primary);
    color: var(--bs-primary);
}

.btn-outline-primary:hover {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    transform: translateY(-1px);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Kick player button specific styling */
button[id^="kick-player-"] {
    transition: all 0.15s ease;
    border-width: 1px !important;
    min-width: 32px;
    min-height: 32px;
    padding: 0.25rem 0.5rem !important;
    line-height: 1;
}

button[id^="kick-player-"]:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

button[id^="kick-player-"] i {
    font-size: 0.75rem;
    pointer-events: none;
}

/* Forms */
.form-control, .form-select {
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    transition: var(--transition);
    font-size: 1rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.1);
}

.form-label {
    font-weight: 500;
    color: var(--bs-dark);
    margin-bottom: 0.5rem;
}

/* Game-specific styles */
.timer-display {
    font-size: 2.5rem;
    font-weight: 300;
    color: #fff !important;
}

.timer-warning {
    color: #fff !important;
}

.timer-danger {
    color: #fff !important;
}

.word-display {
    font-size: 2rem;
    font-weight: 500;
    padding: 2rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: var(--border-radius);
    text-align: center;
    margin: 1.5rem 0;
}

.score-card {
    background: linear-gradient(135deg, var(--bs-primary) 0%, #1565c0 100%);
    color: white;
    border: none;
}

.score-number {
    font-size: 2rem;
    font-weight: 300;
}

.team-card {
    transition: var(--transition);
    cursor: pointer;
}

.team-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(60, 64, 67, 0.15);
}

.team-card.active {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 2px rgba(var(--bs-primary-rgb), 0.25);
}

.collapse-icon {
    transition: transform 0.2s ease;
}

.collapse-icon[aria-expanded="false"] {
    transform: rotate(-90deg);
}

.team-join-action {
    background-color: rgba(var(--bs-primary-rgb), 0.05);
}

.role-indicator i {
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.role-indicator i.fa-microphone {
    animation: gentle-glow 2s infinite alternate;
}

@keyframes gentle-glow {
    from { opacity: 0.8; }
    to { opacity: 1; }
}

.player-nickname {
    font-weight: 500;
}

/* Skipped words styling */
.skipped-word-item {
    position: relative;
}

.category-tooltip-icon {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.7rem;
    color: #6c757d;
    background: white;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dee2e6;
    z-index: 10;
}

.category-tooltip-icon:hover {
    color: var(--bs-primary);
    cursor: help;
}

.skipped-words-list {
    max-height: 100px;
    overflow-y: auto;
}

/* Player list */
.player-list {
    max-height: 300px;
    overflow-y: auto;
}

.team-players-list {
    max-height: 200px;
    overflow-y: auto;
}

.player-item {
    padding: 0.75rem;
    border-bottom: 1px solid #e0e0e0;
    transition: var(--transition);
}

.player-item:last-child {
    border-bottom: none;
}

.player-item.current-explainer {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    border-left: 4px solid var(--bs-primary);
}

/* Connection status */
.connection-online { color: #4caf50 !important; }
.connection-connecting { color: #ff9800 !important; }
.connection-offline { color: #f44336 !important; }
.connection-ready { color: #1976d2 !important; }

/* Modals */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 32px rgba(60, 64, 67, 0.2);
}

.modal-backdrop {
    backdrop-filter: blur(4px);
}

/* Toasts */
.toast {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: 0 4px 12px rgba(60, 64, 67, 0.15);
}

.toast-success { border-left: 4px solid #4caf50; }
.toast-warning { border-left: 4px solid #ff9800; }
.toast-error { border-left: 4px solid #f44336; }
.toast-info { border-left: 4px solid #2196f3; }

/* Loading states */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    z-index: 10;
}

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

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

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

.pulse-animation {
    animation: pulse 2s infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .timer-display {
        font-size: 2rem;
    }
    
    .word-display {
        font-size: 1.5rem;
        padding: 1.5rem;
    }
    
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .modal-dialog {
        margin: 1rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .timer-display {
        font-size: 1.75rem;
    }
    
    .word-display {
        font-size: 1.25rem;
        padding: 1rem;
    }
    
    .score-number {
        font-size: 1.5rem;
    }
}

/* Expandable Team Score Blocks */
.team-score-expandable {
    transition: var(--transition);
}

.team-score-header {
    transition: var(--transition);
}

.team-score-header:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.05);
}

.team-score-header .collapse-icon {
    transition: transform 0.2s ease;
}

.team-score-header[aria-expanded="true"] .collapse-icon {
    transform: rotate(180deg);
}

.team-members-list {
    background-color: rgba(var(--bs-primary-rgb), 0.02);
}

.team-member-item {
    transition: var(--transition);
    border-color: rgba(var(--bs-primary-rgb), 0.1) !important;
}

.team-member-item:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.05);
}

.role-indicator i {
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.role-indicator i.fa-microphone {
    animation: gentle-glow 2s infinite alternate;
}

.role-indicator i.fa-circle {
    animation: gentle-pulse 3s infinite ease-in-out;
}

@keyframes gentle-pulse {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.transition-transform {
    transition: transform 0.2s ease;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --bs-primary: #0d47a1;
        --border-color: #000;
    }
    
    .card {
        border-color: #000;
    }
    
    .form-control, .form-select {
        border-color: #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus indicators for keyboard navigation */
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* Home Page Container Improvements */
.row.justify-content-center .col-11.col-sm-10.col-md-8.col-lg-6.col-xl-5 {
    max-width: 800px;
}

.row.g-4.justify-content-center {
    margin: 0 -1rem;
}

.row.g-4.justify-content-center > [class*="col-"] {
    padding: 0 1rem;
}

/* Home Page Card Improvements */
.home-action-card {
    height: 100%;
    min-height: 380px;
    transition: var(--transition);
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e3e6ea;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.home-action-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 25px rgba(60, 64, 67, 0.15);
    border-color: rgba(var(--bs-primary-rgb), 0.3);
}

.home-action-card .card-body {
    padding: 2rem 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    text-align: center;
    flex: 1;
}

.home-action-card .icon-wrapper {
    opacity: 0.85;
    transition: var(--transition);
    margin-bottom: 1.5rem;
    flex-shrink: 0;
    position: relative;
}

.home-action-card:hover .icon-wrapper {
    opacity: 1;
    transform: scale(1.05);
}

.home-action-card .card-title {
    flex-shrink: 0;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--bs-dark);
}

.home-action-card .card-text {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 1.5rem;
    min-height: 3rem;
    line-height: 1.5;
    padding: 0 1rem;
    font-size: 1rem;
}

.home-action-card .btn {
    white-space: nowrap;
    width: auto;
    min-width: 160px;
    max-width: 220px;
    font-size: 1rem;
    font-weight: 600;
    flex-shrink: 0;
    padding: 0.875rem 2rem;
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
    margin-top: auto;
}

/* Large desktop improvements */
@media (min-width: 1200px) {
    .col-xl-5 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
    
    .home-action-card {
        max-width: 100%;
        width: 100%;
    }
    
    .row.justify-content-center .col-11.col-sm-10.col-md-8.col-lg-6.col-xl-5 {
        max-width: 1000px;
    }
}

/* Responsive improvements for home page */
@media (max-width: 768px) {
    .row.justify-content-center .col-11.col-sm-10.col-md-8.col-lg-6.col-xl-5 {
        max-width: 650px;
    }
    
    .home-action-card {
        min-height: 340px;
        max-width: 380px;
    }
    
    .home-action-card .card-body {
        padding: 1.75rem 1.5rem;
    }
    
    .home-action-card .icon-wrapper i {
        font-size: 3rem !important;
    }
    
    .home-action-card .icon-wrapper {
        margin-bottom: 1.25rem;
    }
    
    .home-action-card .btn {
        min-width: 140px;
        max-width: 180px;
        font-size: 0.95rem;
        padding: 0.8rem 1.5rem;
    }
    
    .home-action-card .card-text {
        min-height: 2.5rem;
        margin-bottom: 1.25rem;
        font-size: 0.95rem;
        padding: 0 0.75rem;
    }
    
    .home-action-card .card-title {
        font-size: 1.2rem;
        margin-bottom: 0.875rem;
    }
}

@media (max-width: 576px) {
    .row.justify-content-center .col-11.col-sm-10.col-md-8.col-lg-6.col-xl-5 {
        max-width: 500px;
    }
    
    .home-action-card {
        min-height: 320px;
        max-width: 340px;
    }
    
    .home-action-card .card-body {
        padding: 1.5rem 1.25rem;
    }
    
    .home-action-card .icon-wrapper i {
        font-size: 2.75rem !important;
    }
    
    .home-action-card .icon-wrapper {
        margin-bottom: 1rem;
    }
    
    .home-action-card .btn {
        min-width: 130px;
        max-width: 170px;
        font-size: 0.9rem;
        padding: 0.75rem 1.25rem;
    }
    
    .home-action-card .card-text {
        min-height: 2.25rem;
        font-size: 0.9rem;
        margin-bottom: 1rem;
        padding: 0 0.5rem;
    }
    
    .home-action-card .card-title {
        font-size: 1.15rem;
        margin-bottom: 0.75rem;
    }
    
    .display-4 {
        font-size: 2.25rem;
    }
}

@media (max-width: 400px) {
    .home-action-card {
        max-width: 320px;
        min-height: 300px;
    }
    
    .home-action-card .card-body {
        padding: 1.25rem 1rem;
    }
    
    .home-action-card .btn {
        min-width: 120px;
        max-width: 160px;
        font-size: 0.85rem;
        padding: 0.7rem 1rem;
    }
    
    .home-action-card .icon-wrapper i {
        font-size: 2.5rem !important;
    }
}

/* Print styles */
@media print {
    .navbar, .toast-container, .modal {
        display: none !important;
    }
    
    .container {
        max-width: none;
    }
}
/* Game Interface Styles */
.game-card {
    min-height: 500px;
}

.timer-display {
    display: flex;
    justify-content: center;
    align-items: center;
}

.timer-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bs-primary), #1565c0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(25, 118, 210, 0.3);
    transition: var(--transition);
}

.timer-circle.timer-warning {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    animation: pulse 1s infinite;
    color: #fff;
    box-shadow: 0 4px 20px rgba(255, 152, 0, 0.4);
}

.timer-circle.timer-warning .timer-text {
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: 900;
}

.timer-circle.timer-danger {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    animation: pulse 0.5s infinite;
    color: #fff;
    box-shadow: 0 4px 20px rgba(244, 67, 54, 0.4);
}

.timer-circle.timer-danger .timer-text {
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    font-weight: 900;
}

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

.timer-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Force white text on ALL timer states and elements */
.timer-circle .timer-text,
.timer-circle.timer-warning .timer-text,
.timer-circle.timer-danger .timer-text,
.timer-display,
.timer-display.timer-warning,
.timer-display.timer-danger,
.timer-warning,
.timer-danger,
[class*="timer"] {
    color: #fff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6) !important;
}

/* Additional specificity for any timer text elements */
.timer-circle *,
.timer-display *,
.timer-warning *,
.timer-danger *,
[class*="timer"] * {
    color: inherit !important;
}

.turn-info {
    background: rgba(25, 118, 210, 0.05);
    border-radius: var(--border-radius);
    padding: 1rem;
}

.explainer-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.word-display {
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.current-word {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #e8f5e8, #f1f8e9);
    border-radius: var(--border-radius);
    border: 2px solid #4caf50;
}

.word-text {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2e7d32;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.word-category {
    font-size: 1rem;
    color: #4caf50;
    font-weight: 500;
}

.guesser-view {
    padding: 2rem;
    background: rgba(108, 117, 125, 0.1);
    border-radius: var(--border-radius);
    border: 2px dashed #6c757d;
}

.game-controls {
    margin-top: 2rem;
}

.game-controls .btn {
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.game-controls .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-item {
    text-align: center;
    padding: 0.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    display: block;
    line-height: 1;
}

.team-score-item {
    border-bottom: 1px solid #e9ecef;
    transition: var(--transition);
}

.team-score-item:last-child {
    border-bottom: none;
}

.team-score-item:hover {
    background-color: rgba(25, 118, 210, 0.05);
}

.active-team-highlight {
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.25);
    transition: all 0.3s ease;
}

.active-team-highlight:hover {
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.team-name {
    font-weight: 600;
    color: var(--bs-dark);
}

.team-score .h5 {
    color: var(--bs-primary);
    font-weight: 700;
}

@media (max-width: 768px) {
    .timer-circle {
        width: 100px;
        height: 100px;
    }
    
    .timer-text {
        font-size: 1.25rem;
    }
    
    .word-text {
        font-size: 2rem;
    }
}
