/**
 * SuperNinja Silver Deal Scanner - Styles
 * Clean, modern dashboard styling
 */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --light-gray: #ecf0f1;
    --medium-gray: #95a5a6;
    --dark-gray: #7f8c8d;
    --white: #ffffff;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 8px rgba(0,0,0,0.2);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: var(--primary-color);
    line-height: 1.6;
}

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

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 20px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--warning-color);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--warning-color);
}

/* Dashboard */
.dashboard {
    padding: 30px 0;
}

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

.dashboard-title h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.dashboard-title p {
    color: var(--dark-gray);
    font-size: 1rem;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--success-color);
    color: var(--white);
}

.btn-primary:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-primary:disabled {
    background: var(--dark-gray);
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background: #2980b9;
}

/* Price Cards */
.price-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.price-card {
    background: var(--white);
    border-radius: 10px;
    padding: 25px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--secondary-color);
}

.price-card.highlight {
    border-left-color: var(--success-color);
}

.price-card h3 {
    font-size: 0.9rem;
    color: var(--dark-gray);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-card .value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.price-card .value.dollar {
    font-size: 2rem;
}

.price-card .subtext {
    font-size: 0.85rem;
    color: var(--medium-gray);
}

/* Status Bar */
.status-bar {
    background: var(--white);
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-bar .status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--success-color);
    animation: pulse 2s infinite;
}

.status-indicator.scanning {
    background: var(--warning-color);
}

.status-indicator.error {
    background: var(--accent-color);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Deals Table */
.deals-section {
    background: var(--white);
    border-radius: 10px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.deals-section h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.deals-table {
    width: 100%;
    border-collapse: collapse;
}

.deals-table thead {
    background: var(--light-gray);
}

.deals-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid var(--medium-gray);
}

.deals-table td {
    padding: 15px;
    border-bottom: 1px solid var(--light-gray);
}

.deals-table tr:hover {
    background: #f8f9fa;
}

.discount-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
}

.discount-badge.high {
    background: var(--success-color);
    color: var(--white);
}

.discount-badge.medium {
    background: var(--warning-color);
    color: var(--white);
}

.discount-badge.low {
    background: var(--info-color);
    color: var(--white);
}

.deal-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
}

.deal-link:hover {
    text-decoration: underline;
}

.seller-rating {
    display: flex;
    align-items: center;
    gap: 5px;
}

.seller-rating.excellent {
    color: var(--success-color);
}

.seller-rating.good {
    color: var(--warning-color);
}

.coin-type {
    font-weight: 500;
    color: var(--primary-color);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--dark-gray);
}

.empty-state .icon {
    font-size: 4rem;
    margin-bottom: 20px;
    color: var(--medium-gray);
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 20px;
}

/* Settings Page */
.settings-page {
    background: var(--white);
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 30px auto;
}

.settings-page h1 {
    margin-bottom: 30px;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-color);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--light-gray);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.form-group .help-text {
    font-size: 0.85rem;
    color: var(--dark-gray);
    margin-top: 5px;
}

.settings-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 20px 0;
    margin-top: 60px;
}

footer p {
    color: var(--medium-gray);
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .price-cards {
        grid-template-columns: 1fr;
    }
    
    .deals-table {
        font-size: 0.9rem;
    }
    
    .deals-table th,
    .deals-table td {
        padding: 10px;
    }
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--light-gray);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Chart Section */
.chart-section {
    background: var(--white);
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.chart-header h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin: 0;
}

.chart-controls select {
    padding: 8px 12px;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    background: var(--white);
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: pointer;
}

.chart-controls select:hover {
    border-color: var(--primary-color);
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

@media (max-width: 768px) {
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .chart-container {
        height: 250px;
    }
}