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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
    scroll-behavior: auto;
    overflow-x: hidden;
}

html {
    scroll-behavior: auto;
}

/* Password Protection Screen */
.password-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: all 0.5s ease;
}

/* Animated Background */
.animated-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #7e22ce 100%);
    overflow: hidden;
}

.crypto-particle {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 20s infinite ease-in-out;
}

.crypto-particle:nth-child(1) {
    top: 10%;
    left: 10%;
    width: 200px;
    height: 200px;
    animation-delay: 0s;
}

.crypto-particle:nth-child(2) {
    top: 60%;
    left: 80%;
    width: 180px;
    height: 180px;
    animation-delay: -4s;
}

.crypto-particle:nth-child(3) {
    top: 80%;
    left: 20%;
    width: 160px;
    height: 160px;
    animation-delay: -8s;
}

.crypto-particle:nth-child(4) {
    top: 30%;
    left: 70%;
    width: 140px;
    height: 140px;
    animation-delay: -12s;
}

.crypto-particle:nth-child(5) {
    top: 50%;
    left: 50%;
    width: 220px;
    height: 220px;
    animation-delay: -16s;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.15) 0%, transparent 70%);
}

.crypto-particle:nth-child(6) {
    top: 20%;
    left: 40%;
    width: 100px;
    height: 100px;
    animation-delay: -6s;
}

.crypto-particle:nth-child(7) {
    top: 70%;
    left: 60%;
    width: 120px;
    height: 120px;
    animation-delay: -10s;
}

.crypto-particle:nth-child(8) {
    top: 40%;
    left: 15%;
    width: 190px;
    height: 190px;
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.3;
    }
    25% {
        transform: translate(50px, -50px) rotate(90deg);
        opacity: 0.5;
    }
    50% {
        transform: translate(-30px, -100px) rotate(180deg);
        opacity: 0.4;
    }
    75% {
        transform: translate(-70px, -50px) rotate(270deg);
        opacity: 0.6;
    }
}

/* Password Container */
.password-container {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 50px 40px;
    border-radius: 30px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
    text-align: center;
    max-width: 450px;
    width: 90%;
    animation: slideIn 0.6s ease-out;
    transition: all 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.password-container.success {
    animation: successPulse 0.5s ease;
    background: rgba(16, 185, 129, 0.95);
}

@keyframes successPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.lock-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: lockBounce 2s infinite ease-in-out;
}

@keyframes lockBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.password-title {
    font-size: 2.5rem;
    color: #1e3c72;
    margin-bottom: 10px;
    font-weight: 700;
}

.password-subtitle {
    font-size: 1rem;
    color: #666;
    margin-bottom: 30px;
}

.password-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.password-input-group input {
    flex: 1;
    padding: 18px 24px;
    font-size: 1.1rem;
    border: 3px solid #e0e0e0;
    border-radius: 15px;
    transition: all 0.3s ease;
    font-weight: 600;
    background: white;
}

.password-input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 5px rgba(102, 126, 234, 0.1);
}

.password-input-group input.shake {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

.password-input-group button {
    padding: 18px 35px;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.password-input-group button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.password-input-group button:active {
    transform: translateY(-1px);
}

.password-error {
    color: #dc2626;
    font-size: 0.95rem;
    font-weight: 600;
    min-height: 24px;
    margin-bottom: 10px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.security-badge {
    margin-top: 20px;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 15px;
    font-size: 0.9rem;
    color: #667eea;
    font-weight: 600;
}

/* Main Content Fade In */
#mainContent {
    transition: opacity 0.5s ease;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.last-update {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Wallet Section */
.wallet-section {
    margin-bottom: 30px;
}

.wallet-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.wallet-card:hover {
    transform: translateY(-5px);
}

.wallet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.wallet-header h2 {
    font-size: 1.5rem;
    color: #333;
}

.wallet-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    animation: pulse 2s infinite;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
    }
    50% {
        opacity: 0.8;
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.8);
    }
}

/* Moon Task Calculator - Circular Design */
.moon-task-header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.moon-task-header h2 {
    font-size: 1.8rem;
    margin: 0;
}

.moon-task-badge {
    background: white;
    color: #667eea;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.moon-task-circles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

.moon-circle {
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.moon-circle-inner {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    position: relative;
    border: 8px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    overflow: hidden;
}

.moon-circle-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea08 0%, #764ba208 100%);
    z-index: 0;
}

.moon-circle:hover .moon-circle-inner {
    transform: scale(1.05);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.3);
}

.moon-label {
    font-size: 1rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 15px;
    z-index: 1;
    text-align: center;
}

.moon-circle input {
    width: 100%;
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    border: none;
    background: transparent;
    outline: none;
    z-index: 1;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.moon-circle input:focus {
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.05);
}

.moon-circle input::placeholder {
    color: #ccc;
    font-weight: 600;
}

.moon-unit {
    font-size: 0.9rem;
    font-weight: 600;
    color: #999;
    margin-top: 10px;
    z-index: 1;
}

/* Result Circle - Special Styling */
.moon-circle-result .moon-circle-inner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: rgba(255, 255, 255, 0.5);
}

.moon-circle-result .moon-label {
    color: white;
    font-size: 1.1rem;
}

.moon-result {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    z-index: 1;
    text-align: center;
    padding: 10px;
    transition: all 0.3s ease;
}

.moon-result.flash {
    animation: resultFlash 0.5s ease;
}

@keyframes resultFlash {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    }
}

.moon-circle-result .moon-unit {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

/* Live Rate Circle - Special Styling */
.moon-circle-live .moon-circle-inner {
    background: linear-gradient(135deg, #F3BA2F 0%, #F59E0B 100%);
    border-color: rgba(255, 255, 255, 0.5);
}

.moon-circle-live .moon-label {
    color: white;
    font-size: 1.1rem;
}

.moon-arrow {
    font-size: 2rem;
    color: white;
    margin: 10px 0;
    z-index: 1;
    animation: rotateArrow 3s ease-in-out infinite;
}

@keyframes rotateArrow {
    0%, 100% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(180deg);
    }
}

.moon-circle-live .moon-result {
    font-size: 2rem;
    color: white;
}

.moon-unit-small {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 10px;
    z-index: 1;
    letter-spacing: 1px;
}

/* Profit/Loss Circle - Dynamic Styling */
.moon-circle-profit .moon-circle-inner {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    border-color: rgba(255, 255, 255, 0.5);
}

.moon-circle-profit.negative .moon-circle-inner {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
}

.moon-circle-profit .moon-label {
    color: white;
    font-size: 1.1rem;
}

.moon-circle-profit .moon-result {
    font-size: 2.5rem;
    color: white;
}

.moon-circle-profit .moon-unit {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

/* Remove spinner arrows from number inputs */
.moon-circle input[type="number"]::-webkit-inner-spin-button,
.moon-circle input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.moon-circle input[type="number"] {
    -moz-appearance: textfield;
}

.wallet-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
}

.total-value {
    font-size: 1.8rem;
    font-weight: 700;
}

/* Price Section */
.price-section {
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    color: white;
}

.section-header h2 {
    font-size: 1.8rem;
}

.header-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.dextools-link {
    padding: 10px 18px;
    background: linear-gradient(135deg, #05a88d 0%, #049677 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(5, 168, 141, 0.3);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.dextools-link:hover {
    background: linear-gradient(135deg, #049677 0%, #038364 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(5, 168, 141, 0.5);
}

.dextools-link:active {
    transform: translateY(0);
}

.refresh-btn, .test-btn {
    background: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.test-btn {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.test-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.5);
}

.refresh-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.refresh-btn:active, .test-btn:active {
    transform: scale(0.95);
}

/* Price Cards */
.price-cards {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 25px;
}

/* First column - stack ETH and BNB */
.price-cards #eth-card,
.price-cards #bnb-card {
    grid-column: 1;
}

/* Second column - ETH/BNB Rate takes full height */
.price-cards #ethbnb-card {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: flex;
    flex-direction: column;
}

.price-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.price-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

/* DexTools clickable cards */
.price-card[style*="cursor: pointer"] {
    position: relative;
}

.price-card[style*="cursor: pointer"]:hover {
    box-shadow: 0 15px 50px rgba(5, 168, 141, 0.3);
    border: 2px solid rgba(5, 168, 141, 0.2);
}

.price-card[style*="cursor: pointer"]::before {
    content: '🔗 DexTools';
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #05a88d 0%, #049677 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.price-card[style*="cursor: pointer"]:hover::before {
    opacity: 1;
}

/* ETH/BNB Rate Card - Special Styling */
#ethbnb-card {
    background: white;
}

#ethbnb-card .current-price {
    color: #667eea;
    font-size: 3.5rem;
    margin-bottom: 30px;
}

#ethbnb-card .card-body {
    margin-bottom: 30px;
}

#ethbnb-card .price-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

#ethbnb-card .mini-chart {
    height: 150px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.crypto-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.crypto-symbol {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.crypto-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.crypto-logo:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.crypto-info h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 5px;
}

.live-dot {
    color: #10B981;
    font-size: 0.6rem;
    animation: blink 2s infinite;
    margin-left: 5px;
}

.crypto-code {
    font-size: 0.9rem;
    color: #999;
    font-weight: 600;
}

.price-change {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1rem;
}

.price-change.positive {
    background: #d4edda;
    color: #155724;
}

.price-change.negative {
    background: #f8d7da;
    color: #721c24;
}

.card-body {
    margin-bottom: 20px;
}

.current-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

@keyframes priceUpdate {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Price change animations */
.current-price.price-up {
    animation: flashGreen 1s ease;
}

.current-price.price-down {
    animation: flashRed 1s ease;
}

@keyframes flashGreen {
    0%, 100% {
        background: transparent;
        color: #333;
    }
    50% {
        background: #d4edda;
        color: #155724;
        transform: scale(1.08);
    }
}

@keyframes flashRed {
    0%, 100% {
        background: transparent;
        color: #333;
    }
    50% {
        background: #f8d7da;
        color: #721c24;
        transform: scale(1.08);
    }
}

.price-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item .label {
    font-size: 0.8rem;
    color: #999;
    font-weight: 600;
}

.detail-item .value {
    font-size: 0.95rem;
    color: #333;
    font-weight: 600;
}

/* Mini Chart */
.mini-chart {
    height: 100px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
    position: relative;
}

.mini-chart::before {
    content: '🔴 LIVE';
    position: absolute;
    top: -5px;
    left: 0;
    font-size: 0.7rem;
    color: #EF4444;
    font-weight: 700;
    background: white;
    padding: 2px 8px;
    border-radius: 4px;
    animation: livePulse 2s infinite;
}

.mini-chart canvas {
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

/* Custom Rate Tracker Section */
.custom-rate-section {
    margin-bottom: 30px;
}

.custom-rate-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.custom-rate-inputs {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: end;
    margin-bottom: 25px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #667eea;
}

.input-with-shortcuts {
    display: flex;
    gap: 10px;
    align-items: center;
}

.input-with-shortcuts input {
    flex: 1;
}

.input-group input {
    padding: 12px 16px;
    font-size: 0.95rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
}

.token-shortcuts {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.shortcut-btn {
    padding: 6px;
    border: 3px solid #e0e0e0;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
}

.shortcut-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.shortcut-btn:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.3);
}

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

.shortcut-btn.active {
    border-color: #10B981;
    border-width: 4px;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
    background: rgba(16, 185, 129, 0.05);
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.input-group input.valid {
    border-color: #10B981;
    background: rgba(16, 185, 129, 0.05);
}

.input-group input.invalid {
    border-color: #EF4444;
    background: rgba(239, 68, 68, 0.05);
}

.input-hint {
    font-size: 0.75rem;
    color: #999;
}

.rate-arrow {
    font-size: 2rem;
    color: #667eea;
    padding-bottom: 10px;
    font-weight: bold;
}

.show-rate-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.show-rate-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.show-rate-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

.show-rate-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

.custom-rate-display {
    margin-top: 30px;
    animation: fadeIn 0.5s ease;
}

.custom-rate-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 20px;
    padding: 25px;
    transition: all 0.3s ease;
}

.custom-rate-card:hover {
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 15px 50px rgba(102, 126, 234, 0.25);
}

.rate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.rate-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.dextools-hint {
    font-size: 0.75rem;
    color: #999;
    font-weight: 600;
    background: rgba(102, 126, 234, 0.08);
    padding: 4px 10px;
    border-radius: 6px;
    animation: hintFade 3s ease-in-out infinite;
}

@keyframes hintFade {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

.token-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.token-display {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.custom-token-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 3px solid white;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.custom-token-logo:hover {
    transform: scale(1.15);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    border-color: #667eea;
    animation: logoPulse 0.6s ease;
}

.custom-token-logo:active {
    transform: scale(1.05);
}

@keyframes logoPulse {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6);
    }
}

.token-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.token-symbol {
    font-size: 1.3rem;
    font-weight: 700;
    color: #667eea;
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 4px 8px;
}

.token-symbol:hover {
    color: #764ba2;
    background: rgba(102, 126, 234, 0.1);
    text-decoration: underline;
    transform: translateX(3px);
}

.token-symbol:hover::after {
    content: ' ↗';
    font-size: 0.9rem;
    opacity: 0.7;
}

.data-source {
    font-size: 0.7rem;
    color: #999;
    background: rgba(102, 126, 234, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
    margin-top: 2px;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* Special styling for CoinMarketCap data source */
.data-source[style*="color: rgb(56, 97, 251)"],
.data-source[style*="color:#3861fb"] {
    background: linear-gradient(135deg, rgba(56, 97, 251, 0.15) 0%, rgba(56, 97, 251, 0.25) 100%);
    border: 1px solid rgba(56, 97, 251, 0.3);
    color: #3861fb !important;
    font-weight: 700;
    padding: 3px 10px;
    cursor: help;
    box-shadow: 0 2px 8px rgba(56, 97, 251, 0.2);
}

.data-source[style*="color: rgb(56, 97, 251)"]:hover,
.data-source[style*="color:#3861fb"]:hover {
    background: linear-gradient(135deg, rgba(56, 97, 251, 0.25) 0%, rgba(56, 97, 251, 0.35) 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(56, 97, 251, 0.3);
}

.rate-divider {
    font-size: 1.3rem;
    color: #999;
    padding: 0 5px;
}

.rate-body {
    margin-bottom: 30px;
}

.live-rate-display {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 15px;
}

.live-badge {
    display: inline-block;
    background: #EF4444;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 15px;
    animation: livePulse 2s infinite;
}

@keyframes livePulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
    }
    50% {
        opacity: 0.8;
        box-shadow: 0 0 20px rgba(239, 68, 68, 0.8);
    }
}

.current-rate {
    font-size: 3.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.rate-description {
    font-size: 0.95rem;
    color: #666;
    font-weight: 600;
}

.rate-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.token-price-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border: none;
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
}

.token-price-card:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12) 0%, rgba(118, 75, 162, 0.12) 100%);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    transform: translateY(-3px);
}

.price-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.price-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #667eea;
}

.live-indicator {
    color: #10B981;
    font-size: 0.7rem;
    animation: blink 2s infinite;
}

.price-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0;
}

/* Simplified token price card without charts and borders */
.token-price-card-simple {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    padding: 20px;
    border-radius: 15px;
    border: none;
    transition: all 0.3s ease;
}

.token-price-card-simple:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12) 0%, rgba(118, 75, 162, 0.12) 100%);
}

.mini-price-chart {
    height: 80px;
    position: relative;
}

.mini-price-chart canvas {
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

.main-rate-chart-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.chart-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 20px;
    text-align: center;
}

#custom-rate-chart {
    height: 150px;
}

#custom-rate-chart canvas {
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

/* Professional Trading Panel */
.trading-panel {
    margin-bottom: 40px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 0 10px;
}

.panel-header h2 {
    font-size: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.panel-status {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(16, 185, 129, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid rgba(16, 185, 129, 0.3);
}

.live-pulse {
    width: 12px;
    height: 12px;
    background: #10B981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
}

.status-label {
    font-weight: 700;
    color: #10B981;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.update-speed {
    font-size: 0.75rem;
    color: #666;
    font-weight: 600;
}

.trading-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.trading-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.trading-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.3);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.crypto-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.coin-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dual-logo {
    display: flex;
    align-items: center;
    gap: 5px;
}

.coin-logo-small {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.vs-divider {
    font-size: 1.2rem;
    font-weight: 700;
    color: #999;
}

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

.coin-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.coin-symbol {
    font-size: 0.75rem;
    color: #999;
    font-weight: 600;
    letter-spacing: 1px;
}

.dextools-badge {
    background: linear-gradient(135deg, #05a88d 0%, #049677 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(5, 168, 141, 0.3);
}

.dextools-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(5, 168, 141, 0.5);
}

.rate-indicator {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.price-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.current-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: #333;
    animation: priceFlash 0.5s ease;
}

.rate-price {
    font-size: 2rem;
    color: #667eea;
}

@keyframes priceFlash {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.current-price.price-up {
    color: #10B981;
    animation: priceUpFlash 0.5s ease;
}

.current-price.price-down {
    color: #EF4444;
    animation: priceDownFlash 0.5s ease;
}

@keyframes priceUpFlash {
    0% {
        background: rgba(16, 185, 129, 0.3);
        transform: scale(1);
    }
    50% {
        background: rgba(16, 185, 129, 0.1);
        transform: scale(1.05);
    }
    100% {
        background: transparent;
        transform: scale(1);
    }
}

@keyframes priceDownFlash {
    0% {
        background: rgba(239, 68, 68, 0.3);
        transform: scale(1);
    }
    50% {
        background: rgba(239, 68, 68, 0.1);
        transform: scale(1.05);
    }
    100% {
        background: transparent;
        transform: scale(1);
    }
}

.price-change-badge {
    padding: 8px 14px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
}

.price-change-badge.positive {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
}

.price-change-badge.negative {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
}

.price-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-label {
    font-size: 0.7rem;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: #333;
}

.chart-container {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 12px;
    padding: 15px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.chart-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #667eea;
}

.chart-timeframe {
    font-size: 0.7rem;
    color: #999;
    font-weight: 600;
}

.price-chart {
    width: 100%;
    height: 150px;
    cursor: crosshair;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .trading-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Status Indicator */
.status-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 12px 20px;
    border-radius: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    z-index: 1000;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffc107;
    animation: blink 1.5s infinite;
}

.status-indicator.connected .status-dot {
    background: #28a745;
    animation: livePulse 2s infinite;
}

.status-indicator.error .status-dot {
    background: #dc3545;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

@keyframes livePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 8px rgba(40, 167, 69, 0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    .price-cards {
        grid-template-columns: 1fr;
    }

    .price-cards #eth-card,
    .price-cards #bnb-card,
    .price-cards #ethbnb-card {
        grid-column: 1;
        grid-row: auto;
    }

    #ethbnb-card .mini-chart {
        height: 100px;
    }

    #ethbnb-card .current-price {
        font-size: 2.5rem;
    }

    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .header-buttons {
        width: 100%;
    }
    
    .test-btn, .refresh-btn {
        flex: 1;
    }

    .price-details {
        grid-template-columns: 1fr;
    }

    .wallet-total {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .moon-task-circles {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .moon-circle-inner {
        padding: 20px 15px;
    }

    .moon-circle input {
        font-size: 1.5rem;
    }

    .moon-result {
        font-size: 2rem;
    }

    .moon-arrow {
        font-size: 1.5rem;
    }
    
    .custom-rate-inputs {
        grid-template-columns: 1fr;
    }
    
    .rate-arrow {
        display: none;
    }
    
    .rate-details {
        grid-template-columns: 1fr;
    }
    
    .current-rate {
        font-size: 2rem;
    }
    
    .custom-token-logo {
        width: 40px;
        height: 40px;
    }
    
    .token-symbol {
        font-size: 1.1rem;
    }
    
    .token-display {
        gap: 8px;
    }
    
    .input-with-shortcuts {
        flex-direction: column;
        align-items: stretch;
    }
    
    .token-shortcuts {
        width: 100%;
        justify-content: center;
    }
    
    .shortcut-btn {
        width: 45px;
        height: 45px;
    }
    
    .rate-details-grid {
        grid-template-columns: 1fr;
    }
    
    .live-rate-display .current-rate {
        font-size: 2.5rem;
    }
    
    .price-value {
        font-size: 1.5rem;
    }
    
    .mini-price-chart {
        height: 60px;
    }
}

