/* GameTracker Modern Styles */

:root {
    --accent: #10b981;
    --accent-light: #34d399;
    --accent-dark: #059669;
    --primary: #3b82f6;
    --dark-900: #0c1017;
    --dark-800: #151a26;
    --dark-700: #1e2433;
}

/* Glass effect */
.glass {
    background: rgba(21, 26, 38, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-light {
    background: rgba(30, 36, 51, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card {
    background: linear-gradient(135deg, rgba(30, 36, 51, 0.8) 0%, rgba(21, 26, 38, 0.9) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1rem;
}

/* Sidebar links */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    color: #9ca3af;
    transition: all 0.2s;
}

.sidebar-link:hover {
    background: rgba(16, 185, 129, 0.1);
    color: #fff;
}

.sidebar-link.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.08) 100%);
    color: #10b981;
    border-left: 3px solid #10b981;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    border-radius: 0.625rem;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #e5e7eb;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-outline {
    background: transparent;
    color: #10b981;
    border: 1px solid #10b981;
}

.btn-outline:hover {
    background: rgba(16, 185, 129, 0.1);
}

/* Form inputs */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(12, 16, 23, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.625rem;
    color: white;
    transition: all 0.2s;
    font-size: 0.9375rem;
}

.form-input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.form-input::placeholder {
    color: #6b7280;
}

/* Cards */
.card {
    background: linear-gradient(135deg, rgba(30, 36, 51, 0.7) 0%, rgba(21, 26, 38, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1rem;
    overflow: hidden;
}

.card-hover:hover {
    border-color: rgba(16, 185, 129, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    color: white;
    font-weight: 500;
    z-index: 9999;
    animation: slideIn 0.3s ease;
}

.toast.success {
    background: linear-gradient(135deg, #00ff88, #00cc6a);
}

.toast.error {
    background: linear-gradient(135deg, #ff4444, #cc3333);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */

/* Mobile first responsive utilities */
.container-fluid {
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container-fluid {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container-fluid {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Mobile Navigation */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(12, 16, 23, 0.98);
    backdrop-filter: blur(20px);
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    padding: 1.5rem;
    overflow-y: auto;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    color: #9ca3af;
    font-size: 1.25rem;
}

.mobile-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
    color: #e5e7eb;
    font-weight: 500;
    border-radius: 0.75rem;
    transition: all 0.2s;
}

.mobile-menu a:hover,
.mobile-menu a.active {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.mobile-menu a i {
    width: 24px;
    text-align: center;
    color: #6b7280;
}

.mobile-menu a:hover i,
.mobile-menu a.active i {
    color: #10b981;
}

/* Responsive Grid */
.grid-responsive {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .grid-responsive {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-responsive {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1280px) {
    .grid-responsive {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Server Card Responsive */
.server-card {
    background: linear-gradient(135deg, rgba(30, 36, 51, 0.7) 0%, rgba(21, 26, 38, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1rem;
    padding: 1rem;
    transition: all 0.3s ease;
}

.server-card:hover {
    border-color: rgba(16, 185, 129, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.server-card .server-name {
    font-size: 0.9375rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 640px) {
    .server-card {
        padding: 0.875rem;
    }
    
    .server-card .server-name {
        font-size: 0.875rem;
    }
}

/* Stats Cards Responsive */
.stats-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    background: linear-gradient(135deg, rgba(30, 36, 51, 0.7) 0%, rgba(21, 26, 38, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1rem;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--accent, #10b981) 0%, transparent 70%);
    opacity: 0.1;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
}

.stat-card .stat-label {
    font-size: 0.8125rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

@media (max-width: 640px) {
    .stat-card {
        padding: 1rem;
    }
    
    .stat-card .stat-value {
        font-size: 1.5rem;
    }
}

/* Chart Container Responsive */
.chart-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 100px;
    min-width: 300px;
}

@media (min-width: 640px) {
    .chart-bars {
        gap: 3px;
        height: 120px;
    }
}

.chart-bar {
    flex: 1;
    min-width: 8px;
    background: linear-gradient(to top, #10b981, #34d399);
    border-radius: 2px 2px 0 0;
    transition: all 0.2s;
}

.chart-bar:hover {
    background: linear-gradient(to top, #059669, #10b981);
    transform: scaleY(1.05);
}

/* Table Responsive */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0.75rem;
}

.table-responsive table {
    width: 100%;
    min-width: 500px;
}

/* Tabs Responsive */
.tabs {
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2px;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab {
    flex-shrink: 0;
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #9ca3af;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab:hover {
    color: #e5e7eb;
}

.tab.active {
    color: #10b981;
    border-bottom-color: #10b981;
}

/* Hide on mobile/desktop */
@media (max-width: 1023px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 1024px) {
    .hide-desktop {
        display: none !important;
    }
}

/* Responsive text */
.text-responsive {
    font-size: 0.875rem;
}

@media (min-width: 640px) {
    .text-responsive {
        font-size: 1rem;
    }
}

/* Server page specific */
.server-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .server-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.server-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (max-width: 640px) {
    .server-actions .btn {
        flex: 1;
        min-width: calc(50% - 0.25rem);
        justify-content: center;
        padding: 0.75rem 0.5rem;
        font-size: 0.8125rem;
    }
}

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

@media (max-width: 640px) {
    .player-list {
        max-height: 300px;
    }
}

/* Comments responsive */
.comment-box {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

@media (max-width: 640px) {
    .comment-box {
        padding: 0.75rem;
    }
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.4s ease forwards;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(16, 185, 129, 0.5);
    }
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Online indicator */
.online-indicator {
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: pulse-glow 2s ease-in-out infinite;
}

.offline-indicator {
    width: 10px;
    height: 10px;
    background: #ef4444;
    border-radius: 50%;
}
