:root {
    --primary-yellow: #FFD700;
    --primary-black: #1a1a1a;
    --secondary-black: #2d2d2d;
    --text-light: #ffffff;
    --text-muted: #cccccc;
    --success-green: #28a745;
    --warning-orange: #fd7e14;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: var(--text-light);
    min-height: 100vh;
}

/* Navigation */
.navbar {
    background-color: var(--primary-black) !important;
    border-bottom: 2px solid var(--primary-yellow);
    padding: 1rem 0;
}

.navbar-brand {
    color: var(--primary-yellow) !important;
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    color: var(--text-light) !important;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-yellow) !important;
}

.navbar-toggler {
    border-color: var(--primary-yellow);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 215, 0, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Wallet Balance */
.wallet-balance {
    background-color: var(--secondary-black);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--primary-yellow);
    color: var(--primary-yellow);
    font-weight: bold;
}

/* Buttons */
.btn-warning {
    background-color: var(--primary-yellow) !important;
    color: var(--primary-black) !important;
    border: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-warning:hover {
    background-color: #FFC700 !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

/* Wallet Modal */
.modal-content {
    background-color: var(--secondary-black);
    border: 1px solid var(--primary-yellow);
}

.modal-header {
    border-bottom: 1px solid var(--primary-yellow);
}

.modal-title,
.modal-body {
    color: var(--text-light);
}

.wallet-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wallet-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--primary-black);
    border: 2px solid var(--primary-yellow);
    border-radius: 10px;
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wallet-btn:hover {
    background-color: var(--primary-yellow);
    color: var(--primary-black);
    transform: translateY(-2px);
}

.wallet-btn img {
    width: 40px;
    height: 40px;
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 3rem 0;
}

.hero-section h1 {
    color: var(--primary-yellow);
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-section p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.stat-item {
    background-color: var(--secondary-black);
    padding: 2rem;
    border-radius: 15px;
    border: 2px solid var(--primary-yellow);
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.2);
}

.stat-item h3 {
    color: var(--primary-yellow);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Farm Section */
.farming-section {
    margin-top: 2rem;
}

.farm-card {
    background-color: var(--secondary-black);
    padding: 2rem;
    border-radius: 15px;
    border: 2px solid var(--primary-yellow);
}

.farm-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: var(--primary-black);
    border-radius: 10px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.farm-apy {
    color: var(--success-green);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Presale Section */
.presale-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.presale-timers,
.presale-purchase {
    background-color: var(--secondary-black);
    padding: 2rem;
    border-radius: 15px;
    border: 2px solid var(--primary-yellow);
}

.timer-card {
    text-align: center;
}

.countdown {
    display: flex;
    justify-content: space-around;
    margin-top: 2rem;
}

.countdown-item {
    text-align: center;
}

.countdown-item span {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-yellow);
}

.countdown-item label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    margin: 1rem 0;
}

.status-upcoming {
    background-color: var(--warning-orange);
    color: var(--primary-black);
}

.status-live {
    background-color: var(--success-green);
    color: var(--text-light);
}

.status-ended {
    background-color: #dc3545;
    color: var(--text-light);
}

.presale-purchase h3 {
    color: var(--primary-yellow);
    margin-bottom: 1rem;
}

.presale-info {
    margin-top: 1rem;
    padding: 1rem;
    background-color: var(--primary-black);
    border-radius: 10px;
}

/* Presale Stats */
.presale-stats {
    background-color: var(--secondary-black);
    padding: 2rem;
    border-radius: 15px;
    border: 2px solid var(--primary-yellow);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--primary-black);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.stat-card label {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.5rem;
}

.stat-value {
    color: var(--primary-yellow);
    font-size: 1.5rem;
    font-weight: bold;
}

.rpln-balance {
    color: var(--success-green) !important;
}

/* Progress Bar */
.presale-progress-container {
    margin-top: 1rem;
}

.progress-label {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.presale-progress {
    background-color: var(--primary-yellow);
    height: 25px;
    border-radius: 12px;
    transition: width 0.5s ease;
}

.progress-stats {
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Dynamic Pricing */
.pricing-section {
    background-color: var(--secondary-black);
    padding: 2rem;
    border-radius: 15px;
    border: 2px solid var(--primary-yellow);
}

.pricing-description {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.price-card {
    background-color: var(--primary-black);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(255, 215, 0, 0.3);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.price-card:hover {
    transform: translateY(-2px);
}

.price-card.current {
    border-color: var(--primary-yellow);
    border-width: 2px;
}

.price-card label {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.5rem;
}

.price-value {
    color: var(--primary-yellow);
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.price-rate {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Mobile responsiveness for presale */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .stat-card,
    .price-card {
        padding: 1rem;
    }
    
    .stat-value,
    .price-value {
        font-size: 1.2rem;
    }
}

/* Achievements Section */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.achievement-card {
    background-color: var(--secondary-black);
    padding: 2rem;
    border-radius: 15px;
    border: 2px solid var(--primary-yellow);
    text-align: center;
    transition: transform 0.3s ease;
}

.achievement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.2);
}

.achievement-icon {
    font-size: 3rem;
    color: var(--primary-yellow);
    margin-bottom: 1rem;
}

/* Roadmap Section */
.roadmap-timeline {
    margin-top: 2rem;
}

.phase-card {
    background-color: var(--secondary-black);
    padding: 2rem;
    border-radius: 15px;
    border: 2px solid var(--primary-yellow);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.phase-card:hover {
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.3);
}

.phase-header {
    cursor: pointer;
    user-select: none;
}

.phase-header h3 {
    color: var(--primary-yellow);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress {
    background-color: var(--primary-black);
    height: 15px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar {
    background-color: var(--primary-yellow);
    height: 100%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--primary-black);
}

.phase-content {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 193, 7, 0.2);
}

.phase-content h5 {
    color: var(--primary-yellow);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.phase-content ul {
    list-style: none;
    padding: 0;
    margin-left: 1rem;
}

.phase-content li {
    padding: 0.5rem 0;
    color: var(--text-light);
}

.phase-content li::before {
    content: "✓";
    color: var(--primary-yellow);
    font-weight: bold;
    margin-right: 0.5rem;
}

.feature-list {
    display: grid;
    gap: 1.5rem;
    margin-top: 1rem;
}

.feature-item {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary-yellow);
}

.feature-item strong {
    color: var(--primary-yellow);
    display: block;
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
}

.feature-item ul {
    margin-top: 0.5rem;
}

.badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Toast Notifications */
.toast {
    background-color: var(--secondary-black);
    border: 1px solid var(--primary-yellow);
}

.toast-header {
    background-color: var(--primary-black);
    border-bottom: 1px solid var(--primary-yellow);
    color: var(--text-light);
}

.toast-body {
    color: var(--text-light);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .presale-section {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .countdown {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .countdown-item span {
        font-size: 1.5rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .wallet-options {
        gap: 0.5rem;
    }
    
    .wallet-btn {
        padding: 0.75rem;
        font-size: 1rem;
    }
    
    .wallet-btn img {
        width: 30px;
        height: 30px;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .stat-item,
    .farm-card,
    .presale-timers,
    .presale-purchase,
    .phase-card {
        padding: 1.5rem;
    }
}

/* Touch-friendly buttons for mobile */
@media (hover: none) and (pointer: coarse) {
    .btn-warning,
    .wallet-btn,
    .navbar-nav .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .wallet-btn {
        padding: 1.25rem;
    }
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-yellow);
    animation: spin 1s ease-in-out infinite;
}

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

/* Connection status */
.connection-status {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 0.75rem 1rem;
    border-radius: 25px;
    font-weight: bold;
    z-index: 1000;
    transition: all 0.3s ease;
}

.connection-status.connected {
    background-color: var(--success-green);
    color: var(--text-light);
}

.connection-status.disconnected {
    background-color: #dc3545;
    color: var(--text-light);
}

.connection-status.connecting {
    background-color: var(--warning-orange);
    color: var(--primary-black);
}