/* Vinted Alert — Stili */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

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

/* Header */
header { background: #1976D2; color: white; padding: 12px 0; position: sticky; top: 0; z-index: 100; }
header .container { display: flex; justify-content: space-between; align-items: center; }
header h1 { font-size: 1.3rem; }
header nav { display: flex; gap: 12px; align-items: center; }
header nav a { color: white; text-decoration: none; }

/* Buttons */
.btn {
    padding: 10px 20px; border: none; border-radius: 8px;
    cursor: pointer; font-size: 0.95rem; font-weight: 500;
    text-decoration: none; display: inline-block; transition: all 0.2s;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary { background: #1976D2; color: white; }
.btn-primary:hover:not(:disabled) { background: #1565C0; }
.btn-outline { background: transparent; color: #1976D2; border: 2px solid #1976D2; }
.btn-outline:hover:not(:disabled) { background: #1976D2; color: white; }
.btn-danger { background: #e53935; color: white; }
.btn-danger:hover:not(:disabled) { background: #c62828; }
.btn-small { padding: 6px 12px; font-size: 0.85rem; }
.btn-large { padding: 14px 32px; font-size: 1.1rem; }
.btn-full { width: 100%; }
header .btn-outline { color: white; border-color: white; }
header .btn-outline:hover { background: white; color: #1976D2; }

/* Hero */
.hero {
    background: linear-gradient(135deg, #1976D2, #0D47A1);
    color: white; text-align: center; padding: 80px 20px;
}
.hero h2 { font-size: 2.2rem; margin-bottom: 16px; }
.hero p { font-size: 1.2rem; opacity: 0.9; max-width: 600px; margin: 0 auto 24px; }
.hero-sub { font-size: 0.9rem; opacity: 0.7; margin-top: 12px; }

/* Features */
.features { padding: 60px 20px; background: white; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; }
.feature { text-align: center; padding: 20px; }
.feature-icon { font-size: 2.5rem; margin-bottom: 12px; }
.feature h3 { margin-bottom: 8px; color: #1976D2; }

/* Pricing */
.pricing { padding: 60px 20px; }
.pricing h2 { text-align: center; margin-bottom: 30px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.plan {
    background: white; border-radius: 12px; padding: 30px;
    text-align: center; border: 2px solid #eee;
}
.plan-featured { border-color: #1976D2; position: relative; }
.plan-featured::before {
    content: 'Consigliato'; position: absolute; top: -12px; left: 50%;
    transform: translateX(-50%); background: #1976D2; color: white;
    padding: 4px 16px; border-radius: 20px; font-size: 0.8rem;
}
.plan h3 { margin-bottom: 8px; }
.price { font-size: 2rem; font-weight: 700; color: #1976D2; margin-bottom: 16px; }
.price span { font-size: 0.9rem; color: #999; font-weight: 400; }
.plan ul { list-style: none; margin-bottom: 20px; }
.plan li { padding: 6px 0; border-bottom: 1px solid #f5f5f5; }

/* Footer */
.site-footer { background: #333; color: #aaa; text-align: center; padding: 20px; margin-top: 40px; font-size: 0.85rem; }

/* Auth */
.auth-container {
    max-width: 400px; margin: 80px auto; background: white;
    padding: 40px; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.auth-container h2 { margin-bottom: 20px; }
.auth-container form { display: flex; flex-direction: column; gap: 12px; }
.auth-container input {
    padding: 12px; border: 2px solid #ddd; border-radius: 8px;
    font-size: 1rem;
}
.auth-container input:focus { border-color: #1976D2; outline: none; }
.auth-container p { margin-top: 16px; text-align: center; }
.auth-container a { color: #1976D2; }
.error { color: #e53935; margin-top: 8px; }
.success { color: #2e7d32; margin-top: 8px; }
.text-muted { color: #999; font-size: 0.9rem; }

/* Dashboard */
.dashboard-content { padding-top: 20px; padding-bottom: 40px; }

/* Stats */
.stats-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
    margin-bottom: 20px;
}
.stat-card {
    background: white; border-radius: 12px; padding: 20px;
    text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.stat-value { font-size: 2rem; font-weight: 700; color: #1976D2; }
.stat-label { font-size: 0.85rem; color: #999; margin-top: 4px; }

/* Cards */
.card {
    background: white; border-radius: 12px; padding: 24px;
    margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.card h3 { margin-bottom: 16px; }

/* Plan bar */
.plan-bar, .telegram-bar {
    display: flex; justify-content: space-between; align-items: center;
    gap: 16px; flex-wrap: wrap;
}
.plan-bar h3, .telegram-bar h3 { margin-bottom: 4px; }

/* Tabs */
.tabs { display: flex; gap: 0; margin-bottom: 20px; border-bottom: 2px solid #eee; }
.tab {
    padding: 10px 20px; border: none; background: none; cursor: pointer;
    font-size: 0.95rem; font-weight: 500; color: #999;
    border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s;
}
.tab.active { color: #1976D2; border-bottom-color: #1976D2; }
.tab:hover { color: #333; }

/* Forms */
.form-row { display: flex; gap: 12px; margin-bottom: 12px; }
.form-row input, .form-row select {
    flex: 1; padding: 10px; border: 2px solid #ddd;
    border-radius: 8px; font-size: 0.95rem;
}
.form-row input:focus, .form-row select:focus { border-color: #1976D2; outline: none; }
.form-row label { display: flex; align-items: center; gap: 6px; cursor: pointer; }

/* Alert items */
.alert-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 0; border-bottom: 1px solid #f0f0f0;
    gap: 12px;
}
.alert-info { flex: 1; min-width: 0; }
.alert-info strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alert-meta { font-size: 0.85rem; color: #999; }
.alert-actions { display: flex; gap: 8px; flex-shrink: 0; }
.empty { color: #999; text-align: center; padding: 20px; }

/* Results grid */
.results-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.result-item {
    background: #fafafa; border-radius: 8px; overflow: hidden;
    text-decoration: none; color: inherit; border: 1px solid #eee;
    transition: transform 0.15s, box-shadow 0.15s;
    display: block;
}
.result-item:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.result-img { width: 100%; height: 160px; overflow: hidden; background: #eee; }
.result-img img { width: 100%; height: 100%; object-fit: cover; }
.result-no-img {
    width: 100%; height: 100%; display: flex; align-items: center;
    justify-content: center; color: #ccc; font-size: 0.85rem;
}
.result-info { padding: 10px; }
.result-title {
    font-weight: 500; font-size: 0.9rem; margin-bottom: 4px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.result-price { color: #1976D2; font-weight: 700; font-size: 1.1rem; }
.result-meta { font-size: 0.75rem; color: #999; margin-top: 4px; }

#results-select-bar { margin-bottom: 16px; }
#results-alert-select {
    width: 100%; padding: 10px; border: 2px solid #ddd;
    border-radius: 8px; font-size: 0.95rem;
}
#results-alert-select:focus { border-color: #1976D2; outline: none; }
#results-load-more { margin-top: 16px; }

/* Badges */
.badge {
    padding: 4px 10px; border-radius: 20px; font-size: 0.75rem;
    font-weight: 600; text-transform: uppercase;
}
.badge-free { background: #e0e0e0; color: #666; }
.badge-pro { background: #E3F2FD; color: #1976D2; }
.badge-sniper { background: #FFF3E0; color: #E65100; }

/* Toast */
#toast-container {
    position: fixed; bottom: 20px; right: 20px; z-index: 1000;
    display: flex; flex-direction: column; gap: 8px;
}
.toast {
    padding: 12px 20px; border-radius: 8px; color: white;
    font-size: 0.9rem; font-weight: 500;
    opacity: 0; transform: translateX(100%);
    transition: all 0.3s ease;
    max-width: 350px;
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast-success { background: #2e7d32; }
.toast-error { background: #c62828; }
.toast-info { background: #1976D2; }

/* Responsive */
@media (max-width: 768px) {
    .hero { padding: 50px 20px; }
    .hero h2 { font-size: 1.6rem; }
    .hero p { font-size: 1rem; }

    .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .stat-card { padding: 12px; }
    .stat-value { font-size: 1.5rem; }

    .results-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .result-img { height: 120px; }
}

@media (max-width: 600px) {
    .form-row { flex-direction: column; }
    header .container { flex-direction: column; gap: 8px; }

    .plan-bar, .telegram-bar { flex-direction: column; align-items: flex-start; }

    .alert-item { flex-direction: column; align-items: flex-start; }
    .alert-actions { width: 100%; }
    .alert-actions .btn { flex: 1; text-align: center; }

    .hide-mobile { display: none; }

    .plan-grid { grid-template-columns: 1fr; }
}
