/* Globale Variablen */
:root {
    --primary: #3b61a6; /* Die Hauptfarbe (Blau) */
    --primary-hover: #293d6a;
    --text-main: #111827;
    --text-muted: #6b7280;
    --bg-page: #f9fafb;
    --bg-white: #ffffff;
    --border: #e5e7eb;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.6;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.pt-10 { padding-top: 4rem; }
.pb-10 { padding-bottom: 4rem; }

/* Buttons */
.btn-primary {
    background-color: var(--primary);
    color: var(--bg-white);
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    display: inline-block;
}
.btn-primary:hover { background-color: var(--primary-hover); }

.btn-icon {
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: all 0.2s;
}
.btn-icon:hover { background-color: var(--primary); color: white; }

/* Navbar */
.navbar {
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-container { display: flex; justify-content: space-between; align-items: center; height: 70px; }
.logo a { font-size: 1.5rem; font-weight: 700; text-decoration: none; color: var(--text-main); }
.logo span { color: var(--primary); }
.desktop-nav ul { display: flex; gap: 2rem; list-style: none; }
.desktop-nav a { text-decoration: none; color: var(--text-main); font-weight: 500; transition: color 0.2s; }
.desktop-nav a:hover { color: var(--primary); }
.nav-actions { display: flex; gap: 10px; }

/* Mobile Menu */
.mobile-only { display: none; }
.mobile-menu { background: var(--bg-white); border-bottom: 1px solid var(--border); padding: 20px; }
.mobile-menu ul { list-style: none; display: flex; flex-direction: column; gap: 15px; }
.mobile-menu a { text-decoration: none; color: var(--text-main); font-size: 1.1rem; }
.hidden { display: none; }

/* Hero */
.hero { background: var(--bg-white); padding: 80px 0; border-bottom: 1px solid var(--border); }
.hero h1 { font-size: 3rem; line-height: 1.2; margin-bottom: 15px; letter-spacing: -1px;}
.subtitle { color: var(--text-muted); font-size: 1.1rem; max-width: 600px; margin: 0 auto 30px auto; }

/* Grid / Cards (Startseite & Shops) */
.section-title { font-size: 2rem; margin-bottom: 30px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.shop-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.shop-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--primary); }
.shop-card img { width: 60px; height: 60px; border-radius: 8px; }
.shop-info h3 { font-size: 1.1rem; margin-bottom: 5px; }
.shop-info p { color: var(--text-muted); font-size: 0.9rem; }

/* Steps Section */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 40px; }
.step-card { background: var(--bg-white); padding: 30px 20px; border-radius: var(--radius); text-align: center; box-shadow: var(--shadow); }
.step-number {
    background: linear-gradient(180deg, #74AAFF 0%, var(--primary) 100%);
    color: white; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; font-size: 1.5rem; font-weight: bold; margin: 0 auto 15px auto;
}
.step-card h4 { font-size: 1.2rem; margin-bottom: 10px; }
.step-card p { color: var(--text-muted); font-size: 0.95rem; }

/* Footer */
.footer { background: var(--bg-white); padding: 40px 0; border-top: 1px solid var(--border); margin-top: 40px; }
.footer-links { margin-top: 10px; }
.footer-links a { color: var(--primary); text-decoration: none; margin: 0 10px; }

/* General Modal Styles */
.search-modal {
    margin: auto; border: none; border-radius: var(--radius); box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2);
    width: 90%; max-width: 500px; padding: 0;
}
.search-modal::backdrop { background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(3px); }
.modal-content { padding: 30px; position: relative; }
.close-btn { position: absolute; top: 15px; right: 15px; background: none; border: none; cursor: pointer; color: var(--text-muted); }
.modal-content h2 { margin-bottom: 15px; }
.modal-content input[type="text"] { width: 100%; padding: 12px 15px; border: 2px solid var(--border); border-radius: 8px; font-size: 1rem; margin-bottom: 15px; outline: none; }
.modal-content input[type="text"]:focus { border-color: var(--primary); }
.search-results { list-style: none; max-height: 200px; overflow-y: auto; margin: 0; padding: 0;}
.search-results li { padding: 10px; border-bottom: 1px solid var(--border); cursor: pointer; }
.search-results li:hover { background-color: var(--bg-page); color: var(--primary); }

/* Explorer Layout */
.page-wrapper { padding: 40px 20px; }
.page-header { margin-bottom: 40px; }
.explorer-layout { display: grid; grid-template-columns: 250px 1fr; gap: 30px; align-items: start; }
.sidebar {
    background: var(--bg-white); padding: 25px; border-radius: var(--radius); border: 1px solid var(--border);
    box-shadow: var(--shadow); position: sticky; top: 90px;
}
.sidebar h3 { margin-bottom: 15px; font-size: 1.2rem; padding-bottom: 10px; border-bottom: 2px solid var(--bg-page); }
.sidebar ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.sidebar label { display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--text-main); font-size: 0.95rem; }
.sidebar input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }

/* Coupon List */
.coupon-list { display: flex; flex-direction: column; gap: 20px; }
.coupon-card {
    display: flex; background: var(--bg-white); padding: 20px; border-radius: var(--radius);
    border: 1px solid var(--border); align-items: center; gap: 20px; box-shadow: var(--shadow);
    transition: transform 0.2s, border-color 0.2s;
}
.coupon-card:hover { transform: translateY(-3px); border-color: var(--primary); }
.coupon-logo img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.coupon-details { flex-grow: 1; }
.coupon-badge {
    background-color: #ff3366; color: white; font-size: 0.75rem; font-weight: 700;
    padding: 3px 8px; border-radius: 4px; display: inline-block; margin-bottom: 8px; text-transform: uppercase;
}
.coupon-details h4 { color: var(--primary); font-size: 1.3rem; margin-bottom: 5px; line-height: 1.3; }
.coupon-details p { color: var(--text-muted); font-size: 0.95rem; }
.coupon-action { min-width: 160px; text-align: right; }
.coupon-action button { width: 100%; }

/* Coupon Pop-Up (Modal) & Affiliate Logik */
.coupon-modal .modal-content { display: flex; flex-direction: column; align-items: center; }
.modal-logo { width: 80px; height: 80px; border-radius: 8px; margin-bottom: 15px; border: 1px solid var(--border); object-fit: cover; }
.modal-title { color: var(--primary); margin-bottom: 10px; font-size: 1.4rem; text-align: center; }
.code-box-container { display: flex; gap: 10px; margin: 25px 0; width: 100%; }
.code-box-container input {
    flex-grow: 1; text-align: center; font-weight: 800; font-size: 1.2rem; letter-spacing: 2px;
    background-color: var(--bg-page); margin-bottom: 0; border: 2px dashed var(--primary); color: var(--text-main);
}
.copy-btn { background-color: #00a67e; white-space: nowrap; }
.copy-btn:hover { background-color: #008f6b; }
.redirect-text { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 15px; text-align: center; }
.btn-secondary {
    color: var(--primary); background: none; border: 1px solid var(--primary);
    padding: 10px 20px; border-radius: 8px; text-decoration: none; font-weight: 500; transition: all 0.2s;
}
.btn-secondary:hover { background: var(--bg-page); }

/* Alphabet Filter (shops.html) */
.alphabet-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 30px; }
.alphabet-filter a {
    display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
    background: var(--bg-white); border: 1px solid var(--border); border-radius: 8px;
    color: var(--text-main); text-decoration: none; font-weight: 500; transition: all 0.2s;
}
.alphabet-filter a:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* Category Grid (kategorien.html) */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.category-card {
    background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 30px 20px; text-align: center; text-decoration: none; color: var(--text-main); transition: transform 0.2s, box-shadow 0.2s;
}
.category-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--primary); }
.cat-icon { width: 48px; height: 48px; color: var(--primary); margin-bottom: 15px; }
.category-card h3 { font-size: 1.2rem; margin-bottom: 5px; }
.category-card p { color: var(--text-muted); font-size: 0.9rem; }

/* Responsive Media Queries */
@media (max-width: 850px) {
    .explorer-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
}
@media (max-width: 768px) {
    .desktop-nav { display: none; }
    .mobile-only { display: flex; }
    .hero h1 { font-size: 2.2rem; }
}
@media (max-width: 600px) {
    .coupon-card { flex-direction: column; text-align: center; }
    .coupon-action { width: 100%; text-align: center; }
    .code-box-container { flex-direction: column; }
}