/* Solana Mining Cloud - Tema Escuro com Acentos Neon */

:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #0f1629;
    --bg-card: #151b2e;
    --bg-card-hover: #1a2138;
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --accent-cyan: #00d9ff;
    --accent-green: #00ff88;
    --accent-blue: #0066ff;
    --accent-purple: #8b5cf6;
    --border-color: #1e293b;
    --success: #00ff88;
    --error: #ff4444;
    --warning: #ffaa00;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background com padrão de circuito */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(0, 217, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 255, 136, 0.05) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    z-index: -1;
    pointer-events: none;
}

/* Página de Autenticação */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.auth-logo {
    margin-bottom: 40px;
}

.logo-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    position: relative;
}

.solana-logo {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 20px rgba(0, 217, 255, 0.5));
}

/* Gradiente Solana será definido inline no SVG */

.auth-logo h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.3);
}

.version {
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-form {
    display: none;
    background: var(--bg-card);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.auth-form.active {
    display: block;
}

.auth-form h2 {
    margin-bottom: 25px;
    font-size: 24px;
    color: var(--text-primary);
}

.input-group {
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    padding: 15px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    border: none;
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 217, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 217, 255, 0.4);
}

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

.auth-switch {
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-switch a {
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 600;
}

.auth-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    display: none;
}

.auth-message.success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

.auth-message.error {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid var(--error);
    color: var(--error);
}

/* Layout Principal */
.main-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg-primary);
    position: relative;
    padding-bottom: 80px;
}

.header {
    padding: 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

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

.header-title {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s;
}

.icon-btn:hover {
    background: var(--bg-card);
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.card:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.1);
}

.card-title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

/* Mining Power Circle */
.mining-power-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
}

.mining-power-circle {
    width: 200px;
    height: 200px;
    position: relative;
}

.circle-progress {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        var(--accent-cyan) 0%,
        var(--accent-green) 50%,
        var(--accent-cyan) 100%
    );
    padding: 8px;
    animation: rotate 3s linear infinite;
}

.circle-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.mining-power-value {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.mining-power-label {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

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

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

.stat-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-green);
    margin-bottom: 5px;
}

.stat-change {
    font-size: 12px;
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* Mining Farms */
.mining-farm {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.farm-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
}

.farm-info {
    flex: 1;
}

.farm-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.farm-status {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-online {
    color: var(--success);
}

.status-offline {
    color: var(--text-secondary);
}

.farm-hash {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green));
    border-radius: 4px;
    transition: width 0.3s;
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-cyan {
    background: var(--accent-cyan);
    color: var(--bg-primary);
    box-shadow: 0 4px 15px rgba(0, 217, 255, 0.3);
}

.btn-cyan:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 217, 255, 0.4);
}

.btn-green {
    background: var(--accent-green);
    color: var(--bg-primary);
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
}

.btn-green:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
}

.btn-outline:hover {
    background: rgba(0, 217, 255, 0.1);
}

.btn-full {
    width: 100%;
}

/* Navigation Bar */
.nav-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 10px 0;
    display: flex;
    justify-content: space-around;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 11px;
    transition: all 0.3s;
    padding: 5px 15px;
    border-radius: 8px;
}

.nav-item.active {
    color: var(--accent-cyan);
}

.nav-item svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.nav-item.active svg {
    filter: drop-shadow(0 0 5px rgba(0, 217, 255, 0.5));
}

/* Graph */
.graph-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

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

.graph-title {
    font-size: 14px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.graph-timeframe {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.graph-canvas {
    width: 100%;
    height: 200px;
    position: relative;
}

/* Pool Card */
.pool-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

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

.pool-name {
    font-size: 18px;
    font-weight: 600;
}

.pool-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
}

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

.pool-metric {
    text-align: center;
}

.metric-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.metric-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-cyan);
}

/* Responsive */
@media (max-width: 480px) {
    .main-container {
        padding-bottom: 70px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .pool-metrics {
        grid-template-columns: 1fr;
    }
}

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

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

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

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

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

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

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease-out;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}
