/* Professional Dark Theme for GameTalk */

/* CSS Custom Properties for Consistent Colors */
:root {
    --primary-bg: linear-gradient(135deg, #0f0f23, #1a1a2e, #16213e);
    --secondary-bg: linear-gradient(145deg, #1e1e2e, #2a2a3e);
    --card-bg: linear-gradient(145deg, #1e1e2e, #2a2a3e);
    --navbar-bg: linear-gradient(90deg, #1e1e2e, #2a2a3e);
    --footer-bg: linear-gradient(135deg, #1e1e2e, #2a2a3e);
    --accent-color: #8b5cf6;
    --accent-hover: #a78bfa;
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-muted: #b0b0b0;
    --border-color: #444;
    --card-shadow: rgba(0,0,0,0.3);
    --hover-shadow: rgba(0,0,0,0.4);
}

/* Global Styles */
/* body {
    background: var(--primary-bg) !important;
    color: var(--text-secondary);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
} */

html {
    scroll-behavior: smooth;
}

/* Container and Layout */
.container, .container-fluid {
    max-width: 1200px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

p, .card-text, .text-muted {
    color: var(--text-secondary);
    line-height: 1.6;
}

.text-muted {
    color: var(--text-muted) !important;
}

/* Links */
a {
    color: var(--accent-color);
    text-decoration: none !important;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Navbar */
.navbar {
    background: var(--navbar-bg);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px var(--card-shadow);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--text-primary) !important;
}

.navbar-nav .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--accent-color) !important;
}

.navbar-nav .nav-link {
    white-space: nowrap;
}

.navbar-text {
    color: var(--text-primary);
    white-space: nowrap;
}

/* Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    box-shadow: 0 8px 25px var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px var(--hover-shadow);
}

.card-header {
    background: linear-gradient(90deg, #2a2a3e, #3a3a4e);
    border-bottom: 1px solid #555;
    color: var(--text-primary);
    font-weight: 600;
}

.card-body {
    color: var(--text-secondary);
}

.card-footer {
    background: rgba(255,255,255,0.05);
    border-top: 1px solid #555;
}

/* Buttons */
.btn {
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    padding: 8px 20px;
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent-color), var(--accent-hover));
    color: var(--text-primary);
}

.btn-primary:hover {
    background: linear-gradient(90deg, #7c3aed, var(--accent-color));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: linear-gradient(90deg, #6b7280, #9ca3af);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: linear-gradient(90deg, #4b5563, #6b7280);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(90deg, #10b981, #34d399);
    color: var(--text-primary);
}

.btn-success:hover {
    background: linear-gradient(90deg, #059669, #10b981);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(90deg, #ef4444, #f87171);
    color: var(--text-primary);
}

.btn-danger:hover {
    background: linear-gradient(90deg, #dc2626, #ef4444);
    transform: translateY(-2px);
}

.btn-outline-primary {
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--accent-color);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* Form Controls */
.form-control, .form-select {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--accent-color);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-label {
    color: var(--text-primary);
    font-weight: 500;
}

/* Alerts */
.alert {
    border-radius: 10px;
    border: none;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(90deg, #10b981, #34d399);
    color: #ffffff;
}

.alert-danger {
    background: linear-gradient(90deg, #ef4444, #f87171);
    color: #ffffff;
}

.alert-warning {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    color: #000000;
}

.alert-info {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    color: #ffffff;
}

/* List Group */
.list-group-item {
    background: rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
    border: 1px solid #444;
    transition: background 0.3s ease;
}

.list-group-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Tables */
.table {
    color: #e0e0e0;
}

.table thead th {
    background: linear-gradient(90deg, #2a2a3e, #3a3a4e);
    color: #ffffff;
    border-bottom: 2px solid #555;
}

.table tbody tr {
    background: rgba(255, 255, 255, 0.02);
    transition: background 0.3s ease;
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1e1e2e, #2a2a3e);
    border-top: 1px solid #444;
    margin-top: auto;
}

/* Main Content Wrapper for Sticky Footer */
.main-content {
    flex: 1;
}

/* Comments Styles */
.comment {
    background: linear-gradient(145deg, #1e1e2e, #2a2a3e);
    border: 1px solid #444;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.comment:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.comment-author {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.comment-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: bold;
    margin-left: 15px;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
}

.comment-meta {
    color: #b0b0b0;
    font-size: 0.9rem;
}

.comment-content {
    color: #e0e0e0;
    line-height: 1.7;
    margin-bottom: 15px;
}

.comment-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.vote-buttons .btn {
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 500;
}

.action-buttons .btn {
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 13px;
}

/* Reply Form */
.reply-form {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid #444;
    border-radius: 10px;
    position: relative;
}

.reply-form::before {
    content: '';
    position: absolute;
    top: 0;
    right: 20px;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, #8b5cf6, #a78bfa);
    border-radius: 2px;
}

.reply-form textarea {
    background: rgba(255,255,255,0.08);
    border: 2px solid #444;
    border-radius: 10px;
    padding: 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #ffffff;
    resize: vertical;
}

.reply-form textarea:focus {
    background: rgba(255,255,255,0.12);
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.reply-form .btn {
    border-radius: 20px;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.reply-form .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

/* Nested Comments */
.comment .comment {
    margin-right: 40px;
    margin-bottom: 15px;
}

/* News Image Responsive */
.news-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }

    .card {
        margin-bottom: 20px;
    }

    .comment {
        padding: 15px;
        margin-bottom: 15px;
    }

    .comment .comment {
        margin-right: 20px;
    }

    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 576px) {
    h1.card-title {
        font-size: 1.5rem;
    }

    .comment {
        padding: 10px;
        margin-bottom: 10px;
    }

    .comment-avatar {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .comment-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .vote-buttons, .action-buttons {
        width: 100%;
        justify-content: center;
    }

    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Utilities */
.shadow-lg {
    box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
}

.bg-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* User Avatar and Initials */
.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #8b5cf6;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.user-initials {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
    border: 2px solid #8b5cf6;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    line-height: 80px;
    text-align: center;
}

.avatar-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #8b5cf6;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Search input custom style */
.search-news-input {
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

/* Current avatar preview in modals */
.current-avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    margin: 0 auto;
    overflow: hidden;
    text-align: center;
    line-height: 80px;
}

.current-avatar-preview img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* Modal styles */
.modal-dark {
    background: #1e1e1e;
    border: 1px solid var(--border-color);
}

.modal-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

/* Games page specific styles */
.search-games-input {
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.star-rating {
    color: #ffd700;
}

/* Profile page notification styles */
.notifications-container {
    max-height: 300px;
    overflow-y: auto;
}

/* Fix select option visibility */
select option {
    background: #1e1e2e !important;
    color: #ffffff !important;
}

.notification-item {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
    position: relative;
    transition: background 0.3s ease;
}

.notification-item.unread {
    background: rgba(139, 92, 246, 0.2);
    border-color: #8b5cf6;
}

.notification-item.empty {
    justify-content: center;
    color: var(--text-muted);
    font-style: italic;
}

.notification-icon {
    font-size: 24px;
    margin-right: 15px;
    flex-shrink: 0;
}

.notification-content p {
    margin: 0;
    flex-grow: 1;
    color: var(--text-primary);
}

.notification-content small {
    color: var(--text-muted);
}

.notification-badge {
    width: 12px;
    height: 12px;
    background: #8b5cf6;
    border-radius: 50%;
    position: absolute;
    top: 10px;
    right: 10px;
}

/* Chat page styles */
.chat-container {
    height: 60vh;
    overflow-y: auto;
    background: #1e1e1e;
    border-radius: 15px;
    padding: 15px;
}

.message {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 10px;
}

.my-message {
    background: linear-gradient(90deg, #6a0dad, #8b5cf6);
    text-align: right;
}

.other-message {
    background: #333;
}

.system-message {
    background: linear-gradient(90deg, #ff6b6b, #ee5a24);
    text-align: center;
    font-style: italic;
}

.chat-search-input {
    background: rgba(255,255,255,0.1);
    border: 1px solid #444;
    color: #ffffff;
}

.room-type {
    position: absolute;
    top: 5px;
    left: 5px;
    font-size: 0.8em;
    padding: 2px 6px;
    border-radius: 10px;
}

.room-type.open {
    background: #28a745;
    color: white;
}

.room-type.closed {
    background: #dc3545;
    color: white;
}

.member-count {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.8em;
    background: rgba(0,0,0,0.7);
    padding: 2px 6px;
    border-radius: 10px;
}

.chat-placeholder-text {
    color: var(--accent-color);
    font-size: 1.2em;
    font-weight: 500;
}

.current-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.message-avatar {
    display: inline-block;
    vertical-align: top;
    margin-right: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #8b5cf6;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.user-initials {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-weight: bold;
    border: 2px solid #8b5cf6;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    text-align: center;
    line-height: 1;
}

.table { color: #ffffff; }
.table th { background: #333; }
.table td { background: rgba(255,255,255,0.05); color: #ddd; }