/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

:root {
    --primary-glow: rgba(0, 242, 254, 0.15);
    --secondary-glow: rgba(79, 172, 254, 0.15);
    --gold-glow: rgba(251, 191, 36, 0.2);
    --emerald-glow: rgba(16, 185, 129, 0.25);
    
    --bg-dark: #07090e;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --glass-bg: rgba(15, 23, 42, 0.45);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(255, 255, 255, 0.2);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Background Image Overlay & Blur */
.background-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-image: url('Blocknesia/BG.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.05);
    filter: blur(8px) brightness(0.3);
    transition: transform 0.5s ease;
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 50% 50%, transparent 20%, rgba(7, 9, 14, 0.8) 80%),
                linear-gradient(135deg, rgba(6, 182, 212, 0.05) 0%, rgba(99, 102, 241, 0.05) 100%);
    pointer-events: none;
}

/* Container */
.container {
    width: 100%;
    max-width: 520px;
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Logo styling */
.logo-container {
    position: relative;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.logo-glow {
    position: absolute;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, var(--emerald-glow) 0%, transparent 70%);
    z-index: -1;
    filter: blur(15px);
    animation: floatGlow 4s ease-in-out infinite alternate;
}

.server-logo {
    max-width: 240px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 10px rgba(16, 185, 129, 0.2));
    animation: floatLogo 6s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.server-logo:hover {
    transform: scale(1.05);
}

/* Status Widget */
.status-widget {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 1.25rem 2rem;
    width: 100%;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-widget:hover {
    border-color: var(--glass-border-hover);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5), 0 0 20px rgba(16, 185, 129, 0.05);
}

.status-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ef4444; /* Default offline */
    box-shadow: 0 0 10px #ef4444;
    transition: all 0.5s ease;
}

.status-indicator.online {
    background-color: #10b981;
    box-shadow: 0 0 12px #10b981;
}

.status-indicator.pinging {
    background-color: #f59e0b;
    box-shadow: 0 0 12px #f59e0b;
    animation: pulseGlow 1.5s infinite;
}

.status-text-wrapper {
    display: flex;
    flex-direction: column;
}

.status-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    font-weight: 600;
}

.status-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

.status-players {
    text-align: right;
}

.player-count {
    font-size: 1.25rem;
    font-weight: 800;
    color: #10b981;
    font-feature-settings: "tnum";
}

.player-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* IP Copy Area */
.ip-container {
    width: 100%;
    margin-bottom: 2.5rem;
    position: relative;
}

.ip-row {
    display: flex;
    gap: 1rem;
    width: 100%;
}

.ip-box {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.6);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 0.9rem 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ip-box:hover {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.1);
}

.ip-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ip-title {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    font-weight: 700;
}

.ip-address {
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-main);
}

.ip-port {
    font-size: 0.7rem;
    color: #4facfe;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.ip-copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.ip-box:hover .ip-copy-btn {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #10b981;
}

/* Copy Tooltip */
.copy-tooltip {
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #10b981;
    color: white;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.copy-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: #10b981 transparent transparent;
}

.copy-tooltip.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Nav Links Grid */
.links-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
}

.link-card {
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.35rem 1.75rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 18px;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Background gradient highlights on hover */
.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.link-card:hover::before {
    transform: translateX(100%);
}

.link-card-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    z-index: 2;
}

.link-icon-container {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    transition: all 0.3s ease;
}

.link-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.link-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    transition: color 0.3s ease;
}

.link-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.link-arrow {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: transform 0.3s ease, color 0.3s ease;
    z-index: 2;
}

/* Hover behaviors for individual buttons */
/* Store - Gold Glow */
.link-card.store:hover {
    border-color: rgba(251, 191, 36, 0.4);
    box-shadow: 0 10px 30px rgba(251, 191, 36, 0.1), 0 0 15px rgba(251, 191, 36, 0.05);
    transform: translateY(-3px);
}
.link-card.store .link-icon-container {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.2);
}
.link-card.store:hover .link-icon-container {
    background: #fbbf24;
    color: #07090e;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.4);
}
.link-card.store:hover .link-title {
    color: #fbbf24;
}

/* Vote - Emerald Green */
.link-card.vote:hover {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.1), 0 0 15px rgba(16, 185, 129, 0.05);
    transform: translateY(-3px);
}
.link-card.vote .link-icon-container {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.link-card.vote:hover .link-icon-container {
    background: #10b981;
    color: #07090e;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}
.link-card.vote:hover .link-title {
    color: #10b981;
}

/* Discord - Purple/Blue */
.link-card.discord:hover {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.1), 0 0 15px rgba(99, 102, 241, 0.05);
    transform: translateY(-3px);
}
.link-card.discord .link-icon-container {
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.2);
}
.link-card.discord:hover .link-icon-container {
    background: #6366f1;
    color: white;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}
.link-card.discord:hover .link-title {
    color: #a5b4fc;
}

/* Arrow hover movement */
.link-card:hover .link-arrow {
    transform: translateX(4px);
    color: var(--text-main);
}

/* Footer / Credit */
.footer {
    margin-top: 3rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 500;
    opacity: 0.7;
    text-align: center;
}

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

@keyframes floatLogo {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-8px) scale(1.02);
    }
}

@keyframes floatGlow {
    0%, 100% {
        transform: scale(1) translate(0, 0);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.1) translate(5px, 5px);
        opacity: 1;
    }
}

@keyframes pulseGlow {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.6;
    }
}

/* Responsive tweaks */
@media (max-width: 480px) {
    .container {
        padding: 1.5rem 1rem;
    }
    .ip-row {
        flex-direction: column;
    }
    .status-widget {
        padding: 1rem 1.25rem;
    }
    .link-card {
        padding: 1.15rem 1.25rem;
    }
    .server-logo {
        max-width: 200px;
    }
}
