@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-base: #0a0812;
    --bg-card: rgba(22, 18, 36, 0.6);
    --bg-card-hover: rgba(30, 25, 50, 0.8);
    --accent-purple: #9d7cff;
    --accent-green: #10b981;
    --accent-blue: #3b82f6;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --card-radius: 16px;
    --glass-blur: blur(12px);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(at 0% 0%, hsla(253, 30%, 15%, 1) 0, transparent 50%), 
        radial-gradient(at 100% 0%, hsla(280, 40%, 10%, 1) 0, transparent 40%),
        radial-gradient(at 50% 100%, hsla(250, 40%, 12%, 1) 0, transparent 50%);
    background-attachment: fixed;
}

.main-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1.5rem 6rem;
}

/* Hero Section */
.page-header {
    padding: 5rem 0 3rem;
    text-align: center;
    position: relative;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    background: var(--accent-purple);
    filter: blur(120px);
    opacity: 0.15;
    z-index: -1;
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    line-height: 1;
}

.page-title span {
    background: linear-gradient(135deg, var(--accent-purple), #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 20px rgba(157, 124, 255, 0.3));
}

.global-stats {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: 100px;
    width: fit-content;
    margin: 0 auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    position: relative;
}

.stat:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -1.5rem;
    top: 50%;
    transform: translateY(-50%);
    height: 60%;
    width: 1px;
    background: var(--border);
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

/* Sections */
.section {
    margin-bottom: 5rem;
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 2.5rem;
    gap: 1.5rem;
}

.section-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--border), transparent);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-main);
    white-space: nowrap;
}

/* Grid Layout */
.server-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

/* Card Styling */
.server-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.server-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--border), transparent);
    opacity: 0;
    transition: var(--transition);
}

.server-card:hover {
    transform: translateY(-8px);
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.server-card:hover::before {
    opacity: 1;
}

.card-top {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.game-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    padding: 2px;
    object-fit: cover;
    transition: var(--transition);
}

.server-card:hover .game-icon {
    transform: scale(1.1);
    border-color: var(--card-color);
    box-shadow: 0 0 20px var(--card-color);
}

.card-info {
    flex: 1;
    min-width: 0;
}

.server-name {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-main);
}

.server-ip {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: monospace;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
}

/* Stats Row */
.stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.85rem 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.stat-item:nth-child(2) {
    text-align: right;
    align-items: flex-end;
}

.stat-item .stat-label {
    font-size: 0.65rem;
    opacity: 0.8;
}

.stat-item .stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    text-shadow: none;
}

/* Footer */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.map-badge {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 100px;
    font-weight: 600;
    border: 1px solid var(--border);
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.server-card:hover .map-badge {
    background: rgba(157, 124, 255, 0.1);
    color: var(--accent-purple);
    border-color: rgba(157, 124, 255, 0.2);
}

.btn-join {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 8px 20px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-join:hover {
    background: #ffffff !important;
    color: #000000 !important;
    border-color: #ffffff !important;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.btn-copy {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 4px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-copy:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border-color: var(--card-color);
}

.btn-copy.copied {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border-color: #2ecc71;
}

/* Social Specifics */
.social-card {
    border-top: 4px solid transparent;
}

.live-badge {
    font-size: 0.6rem;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); }
    50% { transform: scale(1.05); opacity: 0.8; box-shadow: 0 0 15px 5px rgba(255, 255, 255, 0); }
    100% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.dot-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

/* Tabs Navigation */
.tabs-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.75rem 2rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    border-color: var(--border-hover);
}

.tab-btn.active {
    background: var(--accent-purple);
    color: white;
    border-color: var(--accent-purple);
    box-shadow: 0 8px 24px rgba(157, 124, 255, 0.25);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.tab-content.active {
    display: block;
}

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

/* Responsive */
@media (max-width: 768px) {
    .page-title { font-size: 2.5rem; }
    .global-stats { gap: 1.5rem; padding: 1rem 1.5rem; flex-wrap: wrap; }
    .stat:not(:last-child)::after { display: none; }
    .server-grid { grid-template-columns: 1fr; }
    .tabs-nav { gap: 0.5rem; flex-wrap: wrap; }
    .tab-btn { padding: 0.6rem 1.2rem; font-size: 0.85rem; }
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    padding: 2.5rem;
    border-radius: 24px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-icon {
    width: 64px;
    height: 64px;
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.modal-icon i {
    width: 32px;
    height: 32px;
}

.modal-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.modal-content p {
    color: var(--text-muted);
    line-height: 1.6;
}

#modal-code {
    color: #2ecc71;
    font-weight: 700;
    background: rgba(46, 204, 113, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}
