* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #111111;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
header {
    display: flex;
    justify-content: center;
    padding: 40px 0 20px 0;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.logo-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 15px rgba(0, 120, 255, 0.3);
}

.server-ip {
    background-color: #1c1c1c;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1px;
    border: 1px solid #333;
}

/* Main Container */
main {
    flex: 1;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    padding: 20px;
}

/* Views (SPA Logic) */
.view {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}
.view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Store View - Banner */
.rank-banner {
    background: linear-gradient(135deg, #1e90ff, #0056b3);
    border-radius: 20px;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(30, 144, 255, 0.2);
}

.rank-info h2 {
    font-size: 32px;
    font-weight: 800;
}

.rank-info .subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 15px;
}

.perks {
    list-style: none;
    font-size: 14px;
    line-height: 1.6;
}

.rank-image img {
    max-height: 200px;
}

/* Store View - Keys Grid */
.keys-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.key-card {
    background-color: #1a1a1a;
    border-radius: 20px;
    padding: 30px 20px;
    width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    border: 1px solid #2a2a2a;
    transition: transform 0.2s;
}

.key-card:hover {
    transform: translateY(-5px);
    border-color: #333;
}

.key-card.popular {
    border: 1px solid #ff6600;
}

.popular-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background-color: #ff6600;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 12px;
}

.key-img {
    height: 80px;
    margin-bottom: 15px;
}

.key-card h3 {
    font-size: 20px;
    margin-bottom: 5px;
}

.key-card .price {
    color: #aaaaaa;
    font-size: 14px;
    margin-bottom: 20px;
}

/* Quantity Selectors */
.qty-selector {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    width: 100%;
}

.qty-btn {
    flex: 1;
    background-color: #2a2a2a;
    border: none;
    color: white;
    padding: 8px 0;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}

.qty-btn:hover {
    background-color: #3a3a3a;
}

.qty-btn.active {
    background-color: #0078ff;
}

/* Buttons */
.add-to-cart-btn {
    width: 100%;
    background-color: #0078ff;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.add-to-cart-btn:hover {
    background-color: #005ecc;
}

/* Username View & Crypto View */
.username-box, .crypto-box {
    background-color: #1a1a1a;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    margin: 40px auto;
    border: 1px solid #2a2a2a;
    text-align: center;
}

.username-box h2 {
    margin-bottom: 30px;
}

.platform-toggle {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.platform-btn {
    background-color: #111;
    border: 1px solid #333;
    color: #aaa;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}

.platform-btn.active {
    background-color: #0078ff;
    color: white;
    border-color: #0078ff;
}

.input-group {
    display: flex;
    background-color: #111;
    border-radius: 8px;
    border: 1px solid #333;
    overflow: hidden;
}

.input-group input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 15px;
    color: white;
    font-size: 16px;
    outline: none;
}

.continue-btn {
    background-color: #0078ff;
    color: white;
    border: none;
    padding: 0 20px;
    font-weight: bold;
    cursor: pointer;
}

.continue-btn:hover {
    background-color: #005ecc;
}

.back-link {
    display: block;
    text-align: center;
    color: #888;
    background: none;
    border: none;
    cursor: pointer;
    margin: 20px auto;
    font-size: 14px;
}

.back-link:hover {
    color: white;
}

/* Crypto View Specifics */
.crypto-details {
    margin-top: 30px;
    background-color: #111;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #333;
}

.qr-code {
    border-radius: 10px;
    margin-bottom: 15px;
}

.wallet-address {
    background-color: #222;
    padding: 10px;
    border-radius: 5px;
    font-family: monospace;
    color: #00ffcc;
    word-break: break-all;
}

.waiting-text {
    margin-top: 15px;
    color: #ffcc00;
    font-size: 14px;
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 20px;
    background-color: #151515;
    border-top: 1px solid #222;
    margin-top: auto;
}

.footer-logo {
    font-weight: 800;
    margin-bottom: 10px;
    color: #aaa;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-links a {
    color: #0078ff;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .rank-banner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    .input-group {
        flex-direction: column;
    }
    .continue-btn {
        padding: 15px;
    }
}

/* Crypto Select Grid */
.crypto-select-box {
    background-color: #1a1a1a;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    margin: 40px auto;
    border: 1px solid #2a2a2a;
    text-align: center;
}

.crypto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.crypto-btn {
    background-color: #111;
    border: 1px solid #333;
    color: white;
    padding: 15px 10px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}

.crypto-btn:hover {
    background-color: #0078ff;
    border-color: #0078ff;
    transform: translateY(-2px);
}

/* Payment View */
.timer {
    font-size: 36px;
    font-weight: 800;
    color: #ff4d4d;
    margin: 10px 0 20px 0;
    font-variant-numeric: tabular-nums;
}

.important-note {
    margin-top: 20px;
    background-color: rgba(255, 102, 0, 0.1);
    border: 1px solid #ff6600;
    padding: 15px;
    border-radius: 8px;
    color: #ddd;
    font-size: 14px;
    line-height: 1.5;
}