/* Price Tracker - Responsive Styles */

:root {
    --primary: #ff9900;
    --primary-dark: #e68a00;
    --bg: #0f0f0f;
    --bg-card: #1a1a1a;
    --text: #e8e8e8;
    --text-muted: #888;
    --border: #333;
    --success: #22c55e;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    padding: 2rem 0 1.5rem;
}

.logo {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

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

/* Main / Search */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
}

.search-form {
    width: 100%;
    max-width: 680px;
}

.search-box {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 600px) {
    .search-box {
        flex-direction: row;
    }
}

.search-input {
    flex: 1;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}

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

.search-input:focus {
    border-color: var(--primary);
}

.search-btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    background: var(--primary);
    color: #000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-btn:hover {
    background: var(--primary-dark);
}

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

.search-hint {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.supported-stores {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.store-badge {
    padding: 0.35rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Search Results / Content Wrapper */
.content-wrapper {
    width: 100%;
    padding: 2rem 0;
}

.content-wrapper .search-form {
    margin-bottom: 2rem;
}

/* Error / Message */
.message {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.message-error {
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid #dc2626;
    color: #fca5a5;
}

.message-info {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid var(--success);
    color: #86efac;
}

/* Extracted content from proxy */
.proxy-content {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.proxy-content a {
    color: var(--primary);
    text-decoration: none;
}

.proxy-content a:hover {
    text-decoration: underline;
}

.proxy-content img {
    max-width: 100%;
    height: auto;
}

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

.proxy-content th,
.proxy-content td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

/* Loading state */
.loading .search-btn::after {
    content: '';
    display: inline-block;
    width: 1em;
    height: 1em;
    margin-left: 0.5rem;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
}

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