/* Reset e configurações base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #000000;
    --secondary-color: #111111;
    --accent-color: #1a1a1a;
    --gold-primary: #d4af37;
    --gold-secondary: #ffd700;
    --gold-dark: #b8860b;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #999999;
    --success-color: #00d4aa;
    --danger-color: #ff6b6b;
    --warning-color: #ffd93d;
    --border-color: #333333;
    --card-bg: #0a0a0a;
    --gradient-primary: linear-gradient(135deg, #d4af37 0%, #ffd700 50%, #b8860b 100%);
    --gradient-gold: linear-gradient(135deg, #ffd700 0%, #d4af37 100%);
    --gradient-card: linear-gradient(145deg, #0a0a0a 0%, #111111 100%);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.9);
    --shadow-gold: 0 0 20px rgba(212, 175, 55, 0.4);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--primary-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Header */
.header {
    background: var(--primary-color);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--gold-primary);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-gold);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.5));
}

.logo-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.header-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.update-time {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--gold-primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 10px var(--gold-primary);
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.7; 
        transform: scale(1.1);
    }
}

/* AdSense Containers */
.ad-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    background: var(--primary-color);
}

.ad-horizontal {
    width: 100%;
    min-height: 90px;
}

.ad-square {
    width: 300px;
    min-height: 250px;
    position: sticky;
    top: 120px;
}

.ad-left {
    margin-right: 2rem;
}

.ad-right {
    margin-left: 2rem;
}

.ad-placeholder {
    background: var(--card-bg);
    border: 2px dashed var(--gold-primary);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    width: 100%;
    height: 100%;
    min-height: inherit;
    position: relative;
    overflow: hidden;
}

.ad-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.ad-label {
    font-size: 0.75rem;
    color: var(--gold-primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ad-content {
    font-weight: 500;
}

/* Content Wrapper */
.content-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    gap: 2rem;
    align-items: start;
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    background: var(--primary-color);
    position: relative;
    overflow: hidden;
    border-top: 1px solid var(--gold-primary);
    border-bottom: 1px solid var(--gold-primary);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
}

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

.stat-item {
    background: var(--gradient-card);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--gold-primary);
    text-align: center;
    box-shadow: var(--shadow-gold);
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--gold-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

/* Main Content */
.main {
    padding: 4rem 0;
    min-height: 60vh;
    background: var(--primary-color);
}

.crypto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--gold-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Crypto Cards */
.crypto-card {
    background: var(--gradient-card);
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.crypto-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.crypto-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover), var(--shadow-gold);
    border-color: var(--gold-primary);
}

.crypto-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.crypto-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.crypto-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold-primary);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.crypto-name {
    display: flex;
    flex-direction: column;
}

.crypto-name h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.crypto-symbol {
    font-size: 0.875rem;
    color: var(--gold-primary);
    text-transform: uppercase;
    font-weight: 600;
}

.crypto-rank {
    background: var(--gradient-gold);
    color: var(--primary-color);
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.crypto-price {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--gold-primary);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.crypto-change {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.change-percentage {
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
}

.change-positive {
    background: rgba(0, 212, 170, 0.2);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.change-negative {
    background: rgba(255, 107, 107, 0.2);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.crypto-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat {
    text-align: center;
    background: rgba(212, 175, 55, 0.1);
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--gold-primary);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-value {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-container {
    margin-top: 1rem;
    position: relative;
    background: rgba(212, 175, 55, 0.05);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

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

.chart-title {
    font-size: 0.75rem;
    color: var(--gold-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.chart-container canvas {
    border-radius: 8px;
    height: 80px !important;
}

/* Footer */
.footer {
    background: var(--secondary-color);
    border-top: 2px solid var(--gold-primary);
    padding: 2rem 0;
    margin-top: 4rem;
    box-shadow: var(--shadow-gold);
}

.footer-content {
    text-align: center;
}

.footer-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.footer-logo-image {
    width: 30px;
    height: 30px;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.5));
}

.footer-logo span {
    font-size: 1.25rem;
    font-weight: 600;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-content p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.disclaimer {
    font-size: 0.875rem;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .ad-square {
        position: static;
        width: 100%;
        max-width: 300px;
        margin: 1rem auto;
    }
    
    .ad-left, .ad-right {
        margin: 1rem 0;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .market-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .crypto-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .header-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .update-time {
        font-size: 0.75rem;
    }
    
    .logo-image {
        width: 40px;
        height: 40px;
    }
    
    .ad-horizontal .ad-placeholder {
        min-height: 60px;
    }
    
    .ad-content {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .crypto-card {
        padding: 1rem;
    }
    
    .crypto-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .crypto-stats {
        grid-template-columns: 1fr;
    }
    
    .crypto-price {
        font-size: 1.5rem;
    }
    
    .logo {
        font-size: 1.25rem;
    }
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--primary-color);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-gold);
    border-radius: 6px;
    border: 2px solid var(--primary-color);
}

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

/* Suporte para Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--gold-primary) var(--primary-color);
}

/* Animações suaves */
@media (prefers-reduced-motion: no-preference) {
    .crypto-card {
        animation: fadeInUp 0.6s ease-out;
    }
    
    .crypto-card:nth-child(even) {
        animation-delay: 0.1s;
    }
    
    .crypto-card:nth-child(3n) {
        animation-delay: 0.2s;
    }
}

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

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .status-dot {
        animation: none;
    }
    
    .spinner {
        animation: none;
    }
    
    .ad-placeholder::before {
        animation: none;
    }
}
