@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

/*
 * Dinastycoin Club - Cosmic Premium Theme
 * This CSS file provides a modern, premium look inspired by the project's concept art.
 * It includes a cosmic background, glassmorphism cards, glowing highlights, and responsive design tweaks.
 */

/* Reset & base styles */
body {
    font-family: 'Inter', sans-serif;
    background: #0b0d10 url('background_swirl.png') no-repeat center center fixed;
    background-size: cover;
    color: #f5f5f5;
    min-height: 100vh;
    position: relative;
}

/* Overlay gradient to darken the cosmic background slightly */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Darker overlay for improved contrast: helps text stand out against the cosmic background */
    background: rgba(0, 0, 0, 0.7);
    pointer-events: none;
    z-index: -1;
}

/* Ensure dropdown menu appears above all content */
.dropdown-menu {
    z-index: 3000;
}

/* Style for status messages: fixed overlay at top center */
#status_messages {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 900px;
    z-index: 4000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}
#status_messages.alert {
    color: #0b0d10;
    font-weight: 600;
}

/* Lighten form labels and input text for better contrast */
.form-check-label,
.form-label,
input.form-control,
label.form-check-label,
small {
    /* Brighten small text for better legibility on dark backgrounds */
    color: #efefef;
}

/* Lighten card subtitle text for readability */
.card-body p,
.card-body span,
.card-body small {
    color: #e5e5e5;
}

/* Increase visibility of legend and account description text */
/* Increase visibility of legend and account description text */
.card-body .text-muted {
    color: #cfcfcf !important;
}

/* Header styling */
header {
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    /* Ensure dropdowns inside header are not clipped */
    position: relative;
    z-index: 2000;
    overflow: visible;
}

header .badge {
    font-size: 0.75rem;
    padding: 0.25em 0.5em;
    background: linear-gradient(145deg, #47362b, #292118);
    border: none;
}

/* Token summary styling */
#token_summary span {
    font-weight: 600;
    font-size: 0.875rem;
    color: #ffffff;
}
#token_summary span i {
    color: #e5b35b;
}
#token_summary small {
    font-size: 0.75rem;
    color: #d7d7d7;
}

/* Language selector */
.dropdown-toggle {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease;
}
.dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
}
.dropdown-menu {
    background-color: #1f222a;
    border: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    /* Ensure the language dropdown stays above all content and background effects */
    z-index: 5000;
    /* Allow scrolling if there are more items than fit in the viewport */
    max-height: 50vh;
    overflow-y: auto;
}
.dropdown-item {
    color: #f5f5f5;
}
.dropdown-item:hover, .dropdown-item:focus {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Navigation pills */
.nav-pills .nav-link {
    color: #f5f5f5;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2rem;
    padding: 0.5rem 1rem;
    margin-right: 0.25rem;
    transition: all 0.2s ease;
}
.nav-pills .nav-link i {
    color: #e5b35b;
}
.nav-pills .nav-link.active {
    background: linear-gradient(145deg, #e5b35b, #ffa726);
    color: #0b0d10;
    box-shadow: 0 4px 12px rgba(255, 167, 38, 0.4);
}
.nav-pills .nav-link.active i {
    color: #0b0d10;
}
.nav-pills .nav-link:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Card styling: glassmorphism effect */
.card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(6px);
    border-radius: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.card-title {
    color: #f5f5f5;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Improve general text readability inside cards */
.card-body,
.form-check-label,
.form-label {
    color: #e0e0e0;
}

/* Lighten muted text for better contrast */
.text-muted {
    color: #b3b3b3 !important;
}
.card-body hr {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Buttons */
.btn-success {
    background: linear-gradient(145deg, #36d09d, #2bb673);
    border: none;
    color: #0b0d10;
    font-weight: 600;
    border-radius: 0.75rem;
}
.btn-success:hover {
    background: linear-gradient(145deg, #2bb673, #36d09d);
}
.btn-primary {
    background: linear-gradient(145deg, #1e88e5, #1565c0);
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: 0.75rem;
}
.btn-primary:hover {
    background: linear-gradient(145deg, #1565c0, #1e88e5);
}
.btn-warning {
    background: linear-gradient(145deg, #ffa726, #f57c00);
    border: none;
    color: #0b0d10;
    font-weight: 600;
    border-radius: 0.75rem;
}
.btn-warning:hover {
    background: linear-gradient(145deg, #f57c00, #ffa726);
}
.btn-outline-primary,
.btn-outline-success {
    border-radius: 0.75rem;
    font-weight: 600;
    color: #e5b35b;
    border-color: #e5b35b;
}
.btn-outline-primary:hover,
.btn-outline-success:hover {
    background: #e5b35b;
    color: #0b0d10;
}
.btn-outline-danger {
    border-radius: 0.75rem;
    font-weight: 600;
    color: #e53935;
    border-color: #e53935;
}
.btn-outline-danger:hover {
    background: #e53935;
    color: #f5f5f5;
}

/* Disabled wallet display */
.disabled-wallet {
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Status messages */
#status_messages {
    z-index: 1000;
}
/* Base alert style to make message overlays blend with premium theme */
.alert {
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
/* Success messages (e.g. purchases, spends) */
.alert-success {
    background-color: rgba(60, 180, 75, 0.9); /* green with opacity */
    color: #ffffff;
}
/* Info messages (e.g. scenario applied) */
.alert-info {
    background-color: rgba(70, 130, 180, 0.9); /* blue with opacity */
    color: #ffffff;
}
/* Warning messages */
.alert-warning {
    background-color: rgba(255, 193, 7, 0.9);
    color: #0b0d10;
}
/* Error messages */
.alert-danger {
    background-color: rgba(211, 47, 47, 0.9);
    color: #ffffff;
}

/* Table styling */
.table-dark {
    --bs-table-bg: rgba(255, 255, 255, 0.05);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.07);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.1);
}
.table-dark thead th {
    color: #e5b35b;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}
.table-dark tbody td {
    color: #f5f5f5;
}
.table-dark tbody tr {
    transition: background-color 0.2s ease;
}
.table-dark tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Range slider custom style for market price slider */
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    height: 0.25rem;
    border-radius: 0.5rem;
    background: linear-gradient(90deg, #ffa726 0%, #ffa726 var(--market-progress), rgba(255,255,255,0.2) var(--market-progress), rgba(255,255,255,0.2) 100%);
    outline: none;
    transition: opacity 0.2s;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: #e5b35b;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(229, 179, 91, 0.6);
    transition: background 0.2s;
}
input[type=range]::-webkit-slider-thumb:hover {
    background: #f8c476;
}
input[type=range]::-moz-range-thumb {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: #e5b35b;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(229, 179, 91, 0.6);
    transition: background 0.2s;
}
input[type=range]::-moz-range-thumb:hover {
    background: #f8c476;
}

/* Scenario dropdown styling */
#predefined_scenarios_select {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f5f5f5;
    border-radius: 0.5rem;
}
#predefined_scenarios_select option {
    color: #0b0d10;
    background: #f5f5f5;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #token_summary span {
        width: 50%;
        margin-bottom: 0.5rem;
    }
    .nav-pills .nav-link {
        padding: 0.5rem;
        margin-bottom: 0.5rem;
    }
}