/* Custom Properties - Cyberpunk Theme */
:root {
    --bg-dark: #12141c;
    --card-bg: rgba(26, 28, 38, 0.95);
    
    /* Dynamically changing theme vars */
    --theme-color: #0A58CA;
    --theme-glow-light: rgba(10, 88, 202, 0.2);
    --theme-glow-med: rgba(10, 88, 202, 0.5);
    --theme-glow-heavy: rgba(10, 88, 202, 0.8);
    
    --neon-cyan: #0ff;
    --neon-magenta: #ff00ff;
    --neon-green: #2ecc71;
    --text-main: #f0f4f8;
    --text-muted: #9ba4b5;
    --accent: #fdd835; /* Gold for logo */
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 16px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.app-container {
    width: 100%;
    max-width: 450px;
    background: #0d1117;
    min-height: 100vh;
    box-shadow: 0 0 50px var(--theme-glow-light);
    position: relative;
    padding-bottom: 90px; /* Space for bottom nav */
    overflow-x: hidden;
    transition: box-shadow 0.3s ease;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--theme-color);
    color: #fff;
    transition: background 0.3s ease;
}

.header h1 {
    font-family: var(--font-body);
    font-size: 1.4rem;
    font-weight: 500;
}

.header-icons {
    display: flex;
    gap: 15px;
}

.neon-icon {
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.neon-icon:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
}

.power-btn {
    color: #fff;
}

/* Logo */
.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 25px 0 10px;
    position: relative;
}

.logo-coin {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, #fdd835 0%, #f57f17 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3.5rem;
    color: #3e2723;
    border: 3px solid #000;
    box-shadow: 0 0 5px var(--accent), inset 0 0 10px rgba(255,255,255,0.8);
    position: relative;
    z-index: 2;
}

.logo-coin::before {
    content: '';
    position: absolute;
    width: 90px; height: 90px;
    border-radius: 50%;
    border: 3px dotted var(--theme-color);
    animation: rotate 20s linear infinite;
    transition: border-color 0.3s ease;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

.premium-badge {
    position: absolute;
    right: 30px;
    top: 20px;
    background: #000;
    border: 1px solid var(--accent);
    padding: 2px 5px;
    border-radius: 4px;
}

.premium-text {
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: bold;
}
.premium-text::after {
    content: "DOLAR AL DIA";
    display: block;
    color: var(--accent);
    font-size: 0.4rem;
    text-align: center;
}

/* Rates Card */
.rates-card {
    background: transparent;
    margin: 0 15px;
    border-radius: var(--border-radius);
    padding: 15px;
    border: 1px solid #4a5568;
    position: relative;
}

/* Rates Items */
.rate-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.top-rate {
    margin-bottom: 15px;
}

.rates-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rates-row .rate-item {
    flex: 1;
}

.rate-title {
    font-size: 0.9rem;
    color: #fff;
    margin-bottom: 5px;
}

.rate-pill {
    background: #fff;
    color: #000;
    padding: 8px 15px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 140px;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.rate-item.active .rate-pill {
    background: var(--theme-color);
    color: #fff;
    box-shadow: 0 0 10px var(--theme-glow-med);
}
.rate-item.active .currency-symbol {
    background: #000;
    color: #fff;
    transition: background 0.3s ease;
}

.currency-symbol {
    font-size: 0.8rem;
    background: #000;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.trend {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.trend.up {
    color: var(--neon-green);
}

/* Separator Line */
.separator-line {
    height: 1px;
    background: #4a5568;
    margin: 15px 0;
}

/* Calculator Inputs */
.calculator-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

.input-group {
    display: flex;
    background: #333842;
    border: 1px solid #4a5568;
    border-radius: 6px;
    overflow: hidden;
    height: 45px;
    position: relative;
    transition: border 0.3s ease, box-shadow 0.3s ease;
}
.input-group:focus-within {
    border-color: var(--theme-color);
    box-shadow: 0 0 10px var(--theme-glow-light);
}

.input-icon {
    width: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    font-size: 1.1rem;
    color: #fff;
}

.bs-icon {
    font-size: 0.9rem;
    font-weight: bold;
}

.input-group input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    padding: 0 10px;
    outline: none;
    width: 100%;
}

.input-group input::placeholder {
    color: transparent;
}

/* Hide number arrows */
.input-group input::-webkit-outer-spin-button,
.input-group input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.copy-btn {
    width: 40px;
    background: transparent;
    border: none;
    border-left: 1px solid #4a5568;
    color: #fff;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}
.copy-btn:hover {
    color: var(--theme-color);
}

/* Swap/Search Icon */
.swap-icon {
    position: absolute;
    right: -40px;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 1.5rem;
    opacity: 0.7;
}

.calc-label {
    position: absolute;
    left: 45px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    font-size: 1rem;
    transition: 0.2s;
}

.input-group input:focus ~ .calc-label,
.input-group input:not(:placeholder-shown) ~ .calc-label {
    opacity: 0;
}

/* Timestamps */
.timestamps {
    margin: 15px 0;
    text-align: center;
    font-size: 0.8rem;
    color: var(--theme-color);
    line-height: 1.6;
    font-weight: bold;
    transition: color 0.3s ease;
}

.cyan-text {
    color: var(--theme-color);
    transition: color 0.3s ease;
}

/* Notification Toggle */
.notify-card {
    background: transparent;
    margin: 0 15px;
    border-radius: 30px;
    padding: 10px 20px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    border: 1px solid #4a5568;
    font-size: 0.8rem;
    color: #fff;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #4a5568;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--theme-color);
    box-shadow: 0 0 10px var(--theme-glow-med);
}

input:checked + .slider:before {
    transform: translateX(20px);
    background-color: #000;
}

/* Refresh Button */
.refresh-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.refresh-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--theme-color);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 15px var(--theme-glow-med);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 450px;
    background: rgba(18, 20, 28, 0.95);
    backdrop-filter: blur(10px);
    border-top: 2px solid var(--theme-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
    z-index: 100;
    transition: border-top-color 0.3s ease;
}

.nav-item {
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.5;
    transition: all 0.3s ease;
}
.nav-item:hover {
    opacity: 0.8;
}

.nav-item.active {
    opacity: 1;
    color: var(--theme-color);
    text-shadow: 0 0 10px var(--theme-glow-med);
}

.nav-text {
    font-size: 0.7rem;
    margin-top: 4px;
    font-family: var(--font-body);
}

/* Color Palette Popup */
.color-palette-popup {
    position: fixed;
    bottom: 80px;
    right: 35px; /* Offset to float nicely above the button */
    background: #1a1c26;
    border: 1px solid var(--theme-color);
    border-radius: 30px;
    padding: 10px;
    display: flex;
    gap: 15px;
    box-shadow: 0 0 20px rgba(0,0,0,0.8), inset 0 0 10px var(--theme-glow-light);
    z-index: 90;
    transform: translateY(0);
    opacity: 1;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.color-palette-popup.hidden {
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
}
.color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #ccc;
    transition: transform 0.2s ease, border-color 0.3s ease;
}
.color-swatch:hover {
    transform: scale(1.15);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--theme-color);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    transition: transform 0.3s ease, background 0.3s ease, opacity 0.3s ease;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
}
.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}
