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

:root {
    --bg-primary: #0d0d0d;
    --bg-secondary: #1a1a1a;
    --bg-card: #262626;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --accent-primary: #00d4ff;
    --accent-secondary: #7c3aed;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --border: #404040;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Card Styles */
.card {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    transition: border-color 0.3s ease;
}

.card:hover {
    border-color: var(--accent-primary);
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
}

select.form-control {
    cursor: pointer;
}

/* Search Results Styles */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-top: 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.search-result-item {
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: var(--bg-card);
}

.search-result-item.selected {
    background-color: var(--accent-primary);
    color: var(--bg-primary);
}

.crypto-name {
    font-weight: 600;
}

.crypto-symbol {
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.9rem;
}

.search-result-item:hover .crypto-symbol {
    color: inherit;
}

.form-group {
    position: relative;
}

/* Radio Group Styles */
.radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: var(--text-primary);
}

.radio-label input[type="radio"] {
    margin-right: 8px;
    accent-color: var(--accent-primary);
}

/* Mode Toggle Styles */
.mode-toggle {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.mode-btn {
    flex: 1;
    padding: 12px 20px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-btn.active {
    background-color: var(--accent-primary);
    color: var(--bg-primary);
    border-color: var(--accent-primary);
}

.mode-btn:hover:not(.active) {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

/* Crypto Info Styles */
.crypto-info {
    margin-top: 24px;
    padding: 20px;
    background-color: var(--bg-secondary);
    border-radius: 8px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.info-value {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

/* Supply Section Styles */
.supply-ratio {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 20px;
}

.ratio-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-primary);
}

.dilution-warning {
    padding: 12px;
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    border-radius: 8px;
    color: var(--error);
    font-size: 0.9rem;
    margin-top: 16px;
}

/* Calculate Button */
.calculate-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    border-radius: 8px;
    color: var(--bg-primary);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 24px;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.3);
}

.calculate-btn:active {
    transform: translateY(0);
}

/* Results Section Styles */
.projected-values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
    padding: 20px;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--accent-primary);
}

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

.projection-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.projection-value {
    display: block;
    color: var(--accent-primary);
    font-size: 1.3rem;
    font-weight: 700;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.result-item {
    padding: 16px;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    text-align: center;
}

.result-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.result-value {
    display: block;
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: 700;
}

.result-value.highlight {
    color: var(--accent-primary);
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    margin-top: 24px;
}

/* Footer Styles */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid var(--border);
}

footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.disclaimer {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* Loading State */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border);
    border-radius: 50%;
    border-top-color: var(--accent-primary);
    animation: spin 1s ease-in-out infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .mode-toggle {
        flex-direction: column;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 12px;
    }
    
    .info-grid,
    .results-grid,
    .projected-values {
        grid-template-columns: 1fr;
    }
}

/* Large Screen Optimizations */
@media (min-width: 1200px) {
    .info-value,
    .result-value,
    .projection-value {
        font-size: 1.2rem;
    }
    
    .container {
        max-width: 1000px;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-success {
    color: var(--success);
}

.text-error {
    color: var(--error);
}

.text-warning {
    color: var(--warning);
}

/* Hover Effects */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}