@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Outfit:wght@400;500;600;700;800;900&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --mc-dark: #090b10;
    --mc-panel: rgba(18, 22, 32, 0.92);
    --mc-border: rgba(255, 255, 255, 0.12);
    --mc-gold: #ffaa00;
    --mc-yellow: #ffea00;
    --mc-green: #22c55e;
    
    --color-pals: #38bdf8;
    --color-supporter: #4ade80;
    --color-investor: #facc15;
    --color-sponsor: #c084fc;
    --color-legendary: #fbbf24;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', 'Inter', sans-serif;
    scroll-behavior: smooth;
    line-height: 1.5;
}

body {
    background-color: var(--mc-dark);
    color: #f1f5f9;
    overflow-x: hidden;
}

/* Background Canvas */
#particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Header Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 6%;
    background: rgba(9, 11, 16, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--mc-border);
    z-index: 1000;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-badge {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--mc-gold), #f97316);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Press Start 2P', cursive;
    font-size: 16px;
    color: #000;
    box-shadow: 0 0 15px rgba(255, 170, 0, 0.4);
}

.logo-text {
    font-size: 22px;
    font-family: 'Press Start 2P', cursive;
    color: var(--mc-gold);
    text-shadow: 2px 2px 0px #000;
}

.nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
}

.nav-links a {
    color: #94a3b8;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.online-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.3);
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    color: var(--mc-green);
}

.online-dot {
    width: 8px;
    height: 8px;
    background-color: var(--mc-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--mc-green);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Hero Section */
.hero {
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 130px 20px 60px;
    background: linear-gradient(to bottom, rgba(9, 11, 16, 0.55), var(--mc-dark)), url('assets/minecraft_banner.jpg') center/cover no-repeat;
}

.hero-tag {
    background: rgba(255, 170, 0, 0.12);
    border: 1px solid rgba(255, 170, 0, 0.3);
    color: var(--mc-gold);
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 46px;
    font-family: 'Press Start 2P', cursive;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 4px 4px 0px #000, 0 0 30px rgba(255, 170, 0, 0.5);
}

.hero p {
    font-size: 17px;
    color: #cbd5e1;
    max-width: 680px;
    margin-bottom: 36px;
    font-weight: 500;
}

/* IP Connect Box */
.ip-connect-container {
    background: var(--mc-panel);
    border: 1px solid var(--mc-border);
    padding: 22px 36px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.7);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
}

.ip-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ip-details {
    text-align: left;
}

.ip-label {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ip-address {
    font-size: 24px;
    font-weight: 900;
    color: var(--mc-gold);
    font-family: 'Outfit', monospace;
    letter-spacing: 0.5px;
}

.btn-copy {
    background: linear-gradient(135deg, var(--mc-gold), #f97316);
    color: #000;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 170, 0, 0.35);
}

.btn-copy:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(255, 170, 0, 0.7);
}

.backup-ips {
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    gap: 10px;
    align-items: center;
}

.backup-ip-chip {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--mc-border);
    padding: 4px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-family: monospace;
    transition: all 0.2s ease;
}

.backup-ip-chip:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* Sections */
.section {
    padding: 80px 5%;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 28px;
    font-family: 'Press Start 2P', cursive;
    color: var(--mc-gold);
    text-shadow: 2px 2px 0 #000;
    margin-bottom: 12px;
}

.section-header p {
    color: #94a3b8;
    font-size: 15px;
}

/* Duration Selector Toggle */
.duration-toggle-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.duration-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--mc-border);
    padding: 5px;
    border-radius: 14px;
    gap: 6px;
}

.toggle-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-btn.active {
    background: linear-gradient(135deg, var(--mc-gold), #f97316);
    color: #000;
    box-shadow: 0 0 15px rgba(255, 170, 0, 0.4);
}

/* Dynamic Ranks Grid: Strict Single Row Stretch */
.ranks-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    align-items: stretch;
    width: 100%;
    transition: all 0.5s cubic-bezier(0.34, 1.25, 0.64, 1);
}

.ranks-grid.grid-3 {
    grid-template-columns: repeat(3, 1fr) !important;
}

.rank-card {
    background: linear-gradient(160deg, rgba(22, 27, 42, 0.97) 0%, rgba(12, 15, 24, 0.99) 100%);
    border: 1px solid var(--card-color, var(--mc-border));
    border-radius: 20px;
    padding: 22px 16px 18px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform 0.5s cubic-bezier(0.34, 1.25, 0.64, 1), opacity 0.4s ease, max-height 0.5s ease, margin 0.5s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    max-height: 800px;
    opacity: 1;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}

.rank-glow {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 80px;
    background: radial-gradient(ellipse, var(--card-color) 0%, transparent 70%);
    opacity: 0.15;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.rank-card:hover .rank-glow {
    opacity: 0.35;
}

.rank-card:hover {
    transform: translateY(-6px);
    border-color: var(--card-color);
    box-shadow: 0 15px 30px rgba(0,0,0,0.8), 0 0 20px var(--card-color);
}

/* Elastic Fly Down animation for non-permanent cards */
.rank-card.fly-down {
    transform: translateY(220px) scale(0.7) rotate(5deg);
    opacity: 0;
    pointer-events: none;
    max-height: 0px;
    padding: 0px;
    margin: 0px;
    border: none;
    position: absolute;
}

.rank-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--card-color, var(--mc-gold));
}

.popular-card {
    border-width: 2px;
    box-shadow: 0 0 20px rgba(192, 132, 252, 0.3);
}

.ribbon {
    position: absolute;
    top: 14px;
    right: -32px;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    color: #fff;
    padding: 3px 30px;
    font-size: 9px;
    font-weight: 800;
    transform: rotate(45deg);
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
    z-index: 10;
}

.rank-header {
    margin-bottom: 14px;
    text-align: center;
}

.square-icon-frame {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    background: #000;
    border: 2px solid var(--card-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 12px var(--card-color);
}

.square-icon-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--card-color);
    margin-bottom: 6px;
}

/* Vibrant Spinning Counter Roll Animation */
.rank-price {
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    display: inline-block;
    overflow: hidden;
}

.price-number {
    display: inline-block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.price-number.roll-spin {
    animation: rollCounterVibrant 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes rollCounterVibrant {
    0% { transform: translateY(-30px) scale(0.6) rotate(-10deg); opacity: 0; filter: blur(4px); }
    50% { transform: translateY(12px) scale(1.2) rotate(5deg); filter: blur(0px); }
    100% { transform: translateY(0) scale(1) rotate(0deg); opacity: 1; }
}

.rank-price span {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
}

.rank-perks {
    list-style: none;
    margin: 14px 0 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rank-perks li {
    font-size: 12px;
    color: #cbd5e1;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.35;
}

.rank-perks li i {
    color: var(--card-color);
    margin-top: 3px;
    font-size: 10px;
}

.btn-buy {
    background: var(--card-color);
    color: #000;
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-buy:hover {
    filter: brightness(1.2);
    box-shadow: 0 0 15px var(--card-color);
}

/* Features Grid Layout */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.feature-card {
    background: var(--mc-panel);
    border: 1px solid var(--mc-border);
    border-radius: 18px;
    padding: 22px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
    background: rgba(22, 27, 40, 0.95);
}

.feature-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 170, 0, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--mc-gold);
    margin-bottom: 14px;
}

.feature-card h3 {
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}

.feature-card p {
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.5;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: #0f121a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 36px;
    width: 90%;
    max-width: 480px;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.9);
    transform: scale(0.9);
    transition: all 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 22px;
    cursor: pointer;
}

.modal-rank-badge {
    font-size: 28px;
    margin-bottom: 10px;
    text-align: center;
}

.modal-title {
    font-size: 20px;
    font-weight: 900;
    margin-bottom: 4px;
    text-align: center;
}

.modal-price-line {
    font-size: 28px;
    font-weight: 900;
    color: var(--mc-gold);
    text-align: center;
    margin-bottom: 24px;
    font-family: 'Outfit', sans-serif;
}

.modal-note {
    text-align: center;
    font-size: 12px;
    color: #64748b;
    margin-top: 10px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--mc-border);
    padding: 12px 16px;
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    outline: none;
}

.form-input:focus {
    border-color: var(--mc-gold);
}

.payment-methods {
    display: flex;
    gap: 10px;
}

.payment-badge {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--mc-border);
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
}

.btn-checkout {
    width: 100%;
    background: linear-gradient(135deg, #7c3aed, #9333ea);
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 14px;
    font-weight: 900;
    font-size: 14px;
    cursor: pointer;
    margin-top: 10px;
    box-shadow: 0 0 24px rgba(139, 92, 246, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 36px rgba(139, 92, 246, 0.75);
    background: linear-gradient(135deg, #6d28d9, #7c3aed);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--mc-green);
    color: #000;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 13px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.8);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 3000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Footer */
footer {
    padding: 36px 6%;
    background: #06080b;
    border-top: 1px solid var(--mc-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #64748b;
    font-size: 13px;
}

@media (max-width: 1024px) {
    .ranks-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
    .ranks-grid.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important; }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 32px; }
    .nav-links { display: none; }
    .ip-row { flex-direction: column; text-align: center; }
    footer { flex-direction: column; gap: 16px; text-align: center; }
}
