/* DreamPlayz - Cyan/Blue Theme */
@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

:root {
    --primary-color: #00e5ff;
    /* Cyan */
    --secondary-color: #2979ff;
    /* Blue */
    --accent-color: #ffffff;
    --text-color: #e0f7fa;
    --text-muted: #b0bec5;
    --bg-overlay: rgba(5, 10, 15, 0.9);
    --bg-panel: rgba(10, 25, 30, 0.95);
    --font-main: 'VT323', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 1.2rem;
}

/* Background */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/bg.jpg') no-repeat center center;
    background-size: cover;
    filter: blur(8px) brightness(0.6);
    z-index: -2;
    transform: scale(1.1);
}

/* Links & Buttons Cursor */
a,
button,
.btn,
input[type="submit"],
select,
.nav-link,
.store-item {
    cursor: pointer;
}

/* Navbar */
.navbar {
    background: rgba(0, 0, 0, 0.85);
    border-bottom: 2px solid var(--primary-color);
    padding: 0 2rem;
    height: 80px;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 229, 255, 0.2);
}

.nav-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-brand img {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 0 5px var(--primary-color));
    transition: transform 0.3s;
}

.nav-brand img:hover {
    transform: scale(1.1) rotate(5deg);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
    height: 100%;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 1.1rem;
    letter-spacing: 1px;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
    text-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
}

.nav-link:hover::after {
    width: 100%;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
    /* Pushes footer down */
}

/* Animations */
.hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    animation: floatText 3s ease-in-out infinite;
}

@keyframes floatText {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes floatButton {

    0%,
    100% {
        top: 0;
    }

    50% {
        top: -10px;
    }
}

/* Unified Hero Buttons */
.hero-btn {
    position: relative !important;
    border: 2px solid rgba(0, 0, 0, 0.4) !important;
    color: #fff !important;
    padding: 1.2rem 3rem !important;
    font-family: var(--font-main) !important;
    font-size: 1.8rem !important;
    text-transform: uppercase !important;
    transition: all 0.1s ease !important;
    border-radius: 8px !important;
    animation: floatButton 4s infinite ease-in-out !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    justify-content: center !important;
    text-decoration: none !important;
    cursor: pointer !important;
    outline: none !important;
    box-sizing: border-box !important;
    line-height: normal !important;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3) !important;
}

.copy-ip-btn,
.discord-btn {
    background: linear-gradient(to bottom, #0099ff, #00ccff) !important;
    box-shadow: 0 12px 0 #004ba0, 0 15px 25px rgba(0, 0, 0, 0.5) !important;
}

.hero-btn:active {
    top: 8px !important;
    box-shadow: 0 4px 0 #004ba0, 0 5px 10px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.05s !important;
}

/* Active state for discord handled by unified hero-btn:active above */

.hero-btns {
    margin-top: 2rem;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

/* Cards */
.card,
.store-item,
.stat-card {
    background: var(--bg-panel);
    border: 3px solid var(--primary-color);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover,
.store-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: 0.5s;
}

.card:hover::before {
    left: 100%;
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.9);
    border-top: 3px solid var(--secondary-color);
    padding: 2rem 0;
    text-align: center;
    margin-top: 0;
}

/* Inputs */
input,
select,
textarea {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid var(--secondary-color);
    color: white;
    padding: 1rem;
    font-family: var(--font-main);
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
    font-size: 1rem;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

.sidebar-link:hover {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.grid-layout {
    display: grid;
    gap: 2rem;
}

/* Particles & Modal */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* IP Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: var(--bg-panel);
    border: 3px solid var(--primary-color);
    padding: 2rem;
    border-radius: 8px;
    max-width: 650px;
    /* Increased for grid layout */
    width: 90%;
    max-height: 90vh;
    /* Ensure it fits on smaller screens */
    display: flex;
    flex-direction: column;
    text-align: center;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.ip-row {
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--secondary-color);
}

.leaf {
    position: fixed;
    z-index: -1;
    pointer-events: none;
}

/* Mobile Actions & Dropdown */
.mobile-actions {
    display: none;
    align-items: center;
}

.mobile-dropdown {
    display: none;
    background: var(--bg-panel);
    border-bottom: 2px solid var(--primary-color);
    padding: 1rem;
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    z-index: 999;
    backdrop-filter: blur(10px);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.mobile-dropdown.active {
    display: block;
}

.mobile-nav-links {
    list-style: none;
    padding: 0;
}

.mobile-nav-links li {
    margin-bottom: 0.5rem;
}

.mobile-nav-links a {
    color: var(--text-color);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 1.2rem;
    display: block;
    padding: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Mobile Media Queries */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-actions {
        display: flex;
    }

    .navbar {
        height: 80px;
        padding: 0 1rem !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        gap: 0 !important;
    }

    .nav-brand img {
        height: 40px;
    }

    .nav-brand span {
        font-size: 1.4rem !important;
    }

    .container {
        padding: 1rem;
    }

    /* Hero adjustments */
    .hero .container {
        grid-template-columns: 1fr !important;
        text-align: center !important;
        gap: 2rem !important;
    }

    .hero-content {
        align-items: center;
        display: flex;
        flex-direction: column;
    }

    .hero-content p {
        font-size: 1.1rem !important;
    }

    .hero-btns {
        display: flex !important;
        gap: 0.5rem !important;
        width: 100%;
        justify-content: center;
    }

    .hero-btns {
        justify-content: center;
    }

    .hero-btn {
        flex: 1;
        padding: 1rem 0.5rem !important;
        font-size: 1.2rem !important;
        margin: 0 !important;
    }

    /* Grid Layouts to Single Column */
    .grid-layout {
        grid-template-columns: 1fr !important;
    }

    .server-tiles {
        grid-template-columns: 1fr !important;
    }
}

#openVoteModal {
    background: linear-gradient(to bottom, #00e5ff, #00b8d4) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 6px 0 #00838f, 0 8px 15px rgba(0, 0, 0, 0.4) !important;
    transition: all 0.1s ease !important;
    position: relative !important;
    top: 0 !important;
}

#openVoteModal:active {
    top: 4px !important;
    box-shadow: 0 2px 0 #00838f, 0 4px 10px rgba(0, 0, 0, 0.3) !important;
}

/* Vote Modal Styles */
.vote-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    overflow-y: auto;
    max-height: 60vh;
    padding: 0.5rem;

    /* Scrollbar Styling */
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.vote-links-grid::-webkit-scrollbar {
    width: 6px;
}

.vote-links-grid::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.vote-links-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.vote-link-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white !important;
    text-decoration: none !important;
    transition: all 0.3s ease;
    text-align: left;
    font-weight: 500;
}

.vote-link-item:hover {
    background: rgba(0, 229, 255, 0.2);
    border-color: #00e5ff;
    transform: translateY(-3px);
    /* Changed from translate-x for grid consistency */
    box-shadow: 0 5px 15px rgba(0, 229, 255, 0.2);
}

.vote-link-item i {
    transition: transform 0.3s ease;
}

.vote-link-item:hover i {
    transform: scale(1.2);
    color: #ffd700;
}