/* Price History Tracker - Styles */

:root {
    --color-bg: #0f1419;
    --color-surface: #1a2332;
    --color-surface-hover: #243044;
    --color-text: #e7e9ea;
    --color-text-muted: #8b98a5;
    --color-accent: #1d9bf0;
    --color-accent-hover: #1a8cd8;
    --color-success: #00ba7c;
    --color-border: #2f3336;
    --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --radius: 12px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 0;
}

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

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
}

.logo:hover {
    text-decoration: underline;
}

.site-header nav a {
    color: var(--color-text-muted);
    text-decoration: none;
    margin-left: 1.5rem;
}

.site-header nav a:hover {
    color: var(--color-text);
}

/* Main */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

/* Hero / Search */
.hero {
    text-align: center;
    padding: 4rem 0;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    color: var(--color-text-muted);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.search-form input[type="url"] {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-text);
}

.search-form input[type="url"]:focus {
    outline: none;
    border-color: var(--color-accent);
}

.search-form input::placeholder {
    color: var(--color-text-muted);
}

.search-form button {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    background: var(--color-accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s;
}

.search-form button:hover {
    background: var(--color-accent-hover);
}

.search-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.search-message {
    min-height: 1.5rem;
    font-size: 0.9rem;
}

.search-message.error {
    color: #f4212e;
}

.search-message.success {
    color: var(--color-success);
}

/* Features */
.features {
    padding: 4rem 0;
}

.features h2 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    text-align: center;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.feature-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* Product detail */
.product-detail {
    padding: 2rem 0;
}

.product-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
}

.product-image {
    width: 300px;
    height: 300px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-bg);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
}

.platform-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--color-accent);
    color: white;
    border-radius: 999px;
    margin-bottom: 0.75rem;
}

.product-info h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.price-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.price-current .value,
.price-lowest .value,
.price-highest .value,
.price-avg .value {
    font-size: 1.25rem;
    font-weight: 700;
}

.price-current .value {
    color: var(--color-success);
}

.price-mrp .strikethrough {
    text-decoration: line-through;
    color: var(--color-text-muted);
}

.price-stats .label {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

.last-updated {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* Chart */
.chart-section {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 2rem;
}

.chart-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

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

.chart-container canvas {
    max-width: 100%;
}

/* Error page */
.error-page {
    text-align: center;
    padding: 4rem 0;
}

.error-page h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.error-page p {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.btn-primary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--color-accent);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--color-accent-hover);
}

/* Footer */
.site-footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 1.5rem 0;
    margin-top: auto;
}

.site-footer p {
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .product-card {
        grid-template-columns: 1fr;
    }

    .product-image {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .price-stats {
        flex-direction: column;
    }
}
