:root {
    --bg-color: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --success: #10b981;
    --success-hover: #059669;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    --amazon: #ff9900;
    --trendyol: #f27a1a;
    --hepsiburada: #ff6000;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.15) 0px, transparent 50%);
    background-attachment: fixed;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Glassmorphism */
.glass-header {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

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

.brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.text-gradient {
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--text-main);
}

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-muted);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.39);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.23);
}

.btn-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

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

.btn-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.btn-success:hover {
    background-color: var(--success);
    color: white;
}

/* Grid & Cards */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.price-drop-alert {
    border-color: var(--success);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.alert-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--success);
    color: white;
    padding: 0.25rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-bottom-left-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.store-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}

.store-badge.amazon { background-color: var(--amazon); }
.store-badge.trendyol { background-color: var(--trendyol); }
.store-badge.hepsiburada { background-color: var(--hepsiburada); }
.store-badge.bilinmeyen { background-color: var(--text-muted); }

.product-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.truncate-name {
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.full-name {
    font-size: clamp(0.85rem, 1.5vw, 1.1rem);
    white-space: normal;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.product-link:hover { text-decoration: underline; }

.price-section {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
}

.price-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.current-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0.25rem 0;
}

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

.card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    width: 100%;
    max-width: 500px;
    padding: 2rem;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--text-main);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* List View Styles */
.product-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-list .product-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
}

.product-list .alert-badge {
    top: 50%;
    transform: translateY(-50%);
    right: 1.5rem;
    border-radius: 8px;
}

.product-list .product-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.product-list .store-badge {
    margin-bottom: 0;
}

.product-list .product-name {
    margin-bottom: 0;
    max-width: 400px;
}

.product-list .price-section {
    margin: 0;
    padding: 0;
    background: transparent;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    margin-right: 8rem;
}

.product-list .current-price {
    font-size: 1.5rem;
    margin: 0;
}

.product-list .card-actions {
    position: absolute;
    right: 1.5rem;
}

.footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 2rem;
}

/* Animations */
@keyframes pulseDrop {
    0% { background: rgba(30, 41, 59, 0.4); }
    50% { background: var(--success); }
    100% { background: rgba(30, 41, 59, 0.4); }
}

@keyframes pulseIncrease {
    0% { background: rgba(30, 41, 59, 0.4); }
    50% { background: var(--danger); }
    100% { background: rgba(30, 41, 59, 0.4); }
}

.price-drop-alert {
    animation: pulseDrop 2s infinite;
}

.price-increase-alert {
    animation: pulseIncrease 2s infinite;
}
/* Responsive */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .product-list .product-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .product-list .product-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .product-list .product-name {
        max-width: 100%;
    }
    
    .product-list .price-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        margin-right: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.2);
        padding: 1rem;
        border-radius: 12px;
    }
    
    .product-list .card-actions {
        position: relative;
        right: auto;
        align-self: flex-end;
        margin-top: 0.5rem;
    }
}