/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --emerald-primary: #66EF8B;
    --emerald-secondary: #8BEEA6;
    --emerald-dark: #4CD178;
    --dark-bg: #0f1419;
    --dark-surface: #1a1f26;
    --dark-elevated: #242b35;
    --text-primary: #ffffff;
    --text-secondary: #a8b3c1;
    --border-color: #2d3748;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

html,
body {
    max-width: 100%;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Subtle Background Particles */
.background-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.03;
    background-image:
        radial-gradient(circle at 20% 30%, var(--emerald-primary) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, var(--emerald-secondary) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, var(--emerald-dark) 0%, transparent 50%);
    animation: particles-float 20s ease-in-out infinite;
}

@keyframes particles-float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, 20px); }
}

/* Navigation */
.navbar {
    position: sticky;
    top: 0;
    background: rgba(15, 20, 25, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    transition: transform 0.2s ease;
}

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

.logo-img {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 0 8px rgba(102, 239, 139, 0.5));
    transition: filter 0.3s ease;
}

.nav-logo:hover .logo-img {
    filter: drop-shadow(0 0 16px rgba(102, 239, 139, 0.8));
}

.logo-text {
    background: linear-gradient(135deg, var(--emerald-primary), var(--emerald-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--emerald-primary), var(--emerald-secondary));
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--emerald-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.btn-login,
.btn-admin {
    background: transparent;
    border: 2px solid var(--emerald-primary);
    color: var(--emerald-primary);
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-login:hover,
.btn-admin:hover {
    background: var(--emerald-primary);
    color: var(--dark-bg);
    box-shadow: 0 0 20px rgba(102, 239, 139, 0.4);
}

.btn-admin {
    border-color: #FFD700;
    color: #FFD700;
}

.btn-admin:hover {
    background: #FFD700;
    color: var(--dark-bg);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.btn-mute-audio {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.btn-mute-audio:hover {
    border-color: var(--emerald-primary);
    color: var(--emerald-primary);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background: var(--emerald-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 8rem 0 6rem;
    background: linear-gradient(135deg, #0f1419 0%, #1a2332 100%);
    overflow: hidden;
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(102, 239, 139, 0.08) 0%, transparent 70%);
    z-index: -1;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--emerald-primary), var(--emerald-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
    animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(102, 239, 139, 0.3)); }
    50% { filter: drop-shadow(0 0 30px rgba(102, 239, 139, 0.6)); }
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 300;
    letter-spacing: 0.05em;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 1rem 2.5rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--emerald-primary), var(--emerald-dark));
    color: var(--dark-bg);
    box-shadow: 0 4px 15px rgba(102, 239, 139, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 239, 139, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--emerald-primary);
    border: 2px solid var(--emerald-primary);
}

.btn-secondary:hover {
    background: rgba(102, 239, 139, 0.1);
    transform: translateY(-2px);
}

/* Sections */
.section {
    padding: 6rem 0;
    position: relative;
    z-index: 1;
}

.section-dark {
    background: var(--dark-surface);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--emerald-primary), var(--emerald-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--dark-elevated);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(102, 239, 139, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.product-card:hover {
    transform: translateY(-8px);
    border-color: var(--emerald-primary);
    box-shadow: 0 8px 30px rgba(102, 239, 139, 0.2);
}

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

.product-card.featured {
    border: 2px solid var(--emerald-primary);
    box-shadow: 0 0 30px rgba(102, 239, 139, 0.15);
}

.product-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    position: relative;
}

.product-icon img {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 12px rgba(102, 239, 139, 0.3));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.product-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.product-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--emerald-primary);
    margin-bottom: 1.5rem;
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: var(--dark-bg);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

.btn-buy {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, var(--emerald-primary), var(--emerald-dark));
    color: var(--dark-bg);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-buy:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(102, 239, 139, 0.4);
}

/* Ranks Grid */
.ranks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.rank-card {
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    transition: all 0.3s ease;
    position: relative;
}

.rank-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.rank-card.featured {
    border: 2px solid var(--emerald-primary);
}

.rank-card.premium {
    border: 2px solid #FFD700;
}

.rank-badge {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

/* Rank Images under rank names */
.rank-image-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 0.75rem 0 1.25rem;
    padding: 0.25rem 0;
}

.rank-image {
    width: 220px;
    max-width: 90%;
    height: auto;
    display: block;
    filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.35));
    transition: transform 0.25s ease, filter 0.25s ease;
    user-select: none;
    -webkit-user-drag: none;
}

.rank-card:hover .rank-image {
    transform: translateY(-2px) scale(1.02);
    filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.45));
}

.rank-badge.iron {
    background: linear-gradient(135deg, #C0C0C0, #A8A8A8);
    color: #000;
}

.rank-badge.diamond {
    background: linear-gradient(135deg, #5DADE2, #3498DB);
    color: #fff;
}

.rank-badge.emerald {
    background: linear-gradient(135deg, var(--emerald-primary), var(--emerald-dark));
    color: var(--dark-bg);
}

.rank-badge.emerald-plus {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: var(--dark-bg);
}

.featured-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--emerald-primary);
    color: var(--dark-bg);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.rank-features {
    list-style: none;
    margin-bottom: 2rem;
}

.rank-features li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.rank-features li:last-child {
    border-bottom: none;
}

.rank-features li strong {
    color: var(--emerald-primary);
}

.rank-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--emerald-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Vote Section */
.vote-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.vote-card {
    background: var(--dark-elevated);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-primary);
}

.vote-card:hover {
    transform: translateY(-8px);
    border-color: var(--emerald-primary);
    box-shadow: 0 8px 30px rgba(102, 239, 139, 0.2);
}

.vote-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--emerald-primary);
}

.vote-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Footer */
.footer {
    background: var(--dark-elevated);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    text-align: center;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-logo-img {
    width: 35px;
    height: 35px;
    filter: drop-shadow(0 0 8px rgba(102, 239, 139, 0.5));
}

.footer-logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--emerald-primary), var(--emerald-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-tagline {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--emerald-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--emerald-secondary);
}

.footer-separator {
    color: var(--text-secondary);
}

.footer-credits {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-credits p {
    margin: 0.5rem 0;
}

.dev-name {
    color: var(--emerald-primary);
    font-weight: 700;
}

.footer-copyright {
    opacity: 0.7;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--dark-elevated);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 3rem;
    max-width: 500px;
    width: 100%;
    position: relative;
    animation: modal-appear 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content {
    scrollbar-width: thin;
    scrollbar-color: var(--emerald-primary) var(--dark-bg);
}

.modal-content::-webkit-scrollbar {
    width: 10px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--dark-bg);
    border-radius: 999px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--emerald-primary), var(--emerald-dark));
    border-radius: 999px;
    border: 2px solid var(--dark-bg);
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--emerald-secondary), var(--emerald-primary));
}

@keyframes modal-appear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--emerald-primary);
}

.modal-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--emerald-primary);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.9rem;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--emerald-primary);
    box-shadow: 0 0 0 3px rgba(102, 239, 139, 0.1);
}

.btn-full {
    width: 100%;
    margin-top: 1rem;
}

.form-footer {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
}

.form-footer a {
    color: var(--emerald-primary);
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

.checkout-summary {
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.checkout-summary h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.checkout-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--emerald-primary);
}

.btn-loader {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--dark-bg);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Notification */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--dark-elevated);
    border: 1px solid var(--emerald-primary);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    z-index: 3000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 90%;
}

.notification.show {
    transform: translateX(0);
}

.notification span {
    color: var(--emerald-primary);
    font-weight: 600;
}

/* Responsive */
@media (max-width: 968px) {
    .nav-container {
        padding: 0 1.5rem;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--dark-surface);
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
        border-top: 1px solid var(--border-color);
        display: none;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-link {
        padding: 1rem 2rem;
    }

    .mobile-toggle {
        display: flex;
        margin-left: auto;
    }

    .nav-actions {
        width: 100%;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .section {
        padding: 4rem 0;
    }

    .products-grid,
    .ranks-grid,
    .vote-grid {
        grid-template-columns: 1fr;
    }

    .notification {
        right: 1rem;
        top: 1rem;
        max-width: calc(100% - 2rem);
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 1rem;
    }

    .hero {
        padding: 4rem 0 3rem;
    }

    .hero-title {
        font-size: 2.5rem;
        letter-spacing: 0.05em;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .nav-actions {
        justify-content: stretch;
    }

    .btn-login,
    .btn-admin,
    .btn-mute-audio {
        width: 100%;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-description {
        font-size: 1rem;
    }

    .modal-content {
        padding: 2rem 1.5rem;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .footer {
        padding: 2rem 0 1.5rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-separator {
        display: none;
    }
}
