:root {
    --primary: #7c3aed;
    --primary-dark: #6d28d9;
    --secondary: #ec4899;
    --accent: #f59e0b;
    --background: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

html {
    overflow-x: hidden;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

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

header {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}


.nav-links a {
    margin-left: 1.5rem;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Navigation Dropdown */
.nav-item-with-dropdown {
    position: relative;
    /* Extra padding skapar en osynlig hover-zon som täcker gapet till dropdown */
    padding-bottom: 1.2rem;
    margin-bottom: -1.2rem;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% - 0.2rem); /* Överlappar nav-itemet lite för att eliminera gap */
    left: -1rem;
    background: white;
    min-width: 260px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    border-radius: 16px;
    padding: 0.8rem 0;
    /* Smooth animation istället för display:none/block */
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    z-index: 1000;
    border: 1px solid #e2e8f0;
    pointer-events: none;
}

.nav-item-with-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-item {
    display: block;
    padding: 0.7rem 1.5rem;
    color: #475569;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: #f8fafc;
    color: var(--primary);
    padding-left: 1.8rem;
}

/* Mobile Nav Sections */
.mobile-nav-section {
    margin: 1.5rem 0;
}

.mobile-section-title {
    font-size: 0.75rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    padding: 0 1rem;
}

.mobile-nav-links .nav-item.sub-item {
    padding-left: 2rem !important;
    font-size: 1rem !important;
    opacity: 0.8;
}

.hero {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, #fdfcfb 0%, #e2d1c3 100%);
    border-radius: var(--radius);
    margin-bottom: 3rem;
}

h1 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    margin-bottom: 1rem;
    font-weight: 900;
    word-break: break-word;
    overflow-wrap: break-word;
}

.hero .intro-text {
    margin: 0 auto 2rem auto;
    text-align: center;
}

.intro-text {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 800px;
    margin-bottom: 2rem;
    line-height: 1.6;
}

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

.card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    display: block;
}

.card:hover {
    transform: translateY(-5px);
}

.card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}

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

/* Generator styles */
.question-container {
    background: white;
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.question-text {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

/* List styles */
.question-list-item {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    border-left: 5px solid var(--primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.75rem;
    background: #f1f5f9;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    color: var(--text-muted);
    font-weight: 600;
}

.tag.rating {
    background: #fee2e2;
    color: #ef4444;
}

/* Voting Styles */
.voting-section {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
}

.vote-btn {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--border);
    background: white;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-main);
}

.vote-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #f5f3ff;
}

.vote-btn.voted {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.vote-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Pagination Styles */
.page-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    transition: all 0.2s;
}

.page-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-btn.next {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

.popular-tags {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.popular-tags-title {
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tag.active-tag {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.site-footer {
    margin-top: 5rem;
    padding: 3.75rem 0 1.5rem;
    background: #ffffff;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

.site-footer-inner {
    width: 100%;
}

.site-footer-grid {
    display: grid;
    grid-template-columns: minmax(150px, 0.75fr) minmax(150px, 0.85fr) minmax(190px, 1fr) minmax(280px, 1.65fr);
    gap: clamp(2rem, 4vw, 4.5rem);
    align-items: start;
}

.site-footer-logo {
    display: inline-block;
    font-size: 2rem;
    line-height: 1;
}

.site-footer-column,
.site-footer-disclaimer {
    min-width: 0;
}

.site-footer-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
}

.site-footer-column h2,
.site-footer-disclaimer h2 {
    margin: 0 0 0.35rem;
    color: #1e293b;
    font-size: 0.82rem;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.3;
    text-transform: uppercase;
}

.site-footer-column a,
.site-footer-link-button {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    text-align: left;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer-link-button {
    border: 0;
    padding: 0;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
}

.site-footer-column a:hover,
.site-footer-link-button:hover {
    color: #4f46e5;
}

.site-footer-bookmark-hint {
    display: none;
    max-width: 200px;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.4;
}

.site-footer-bookmark-hint.is-visible {
    display: block;
}

.site-footer-disclaimer p {
    margin: 0;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.65;
}

.site-footer-bottom {
    margin-top: 3rem;
    padding-top: 1.4rem;
    border-top: 1px solid #e8eef6;
    color: #94a3b8;
    font-size: 0.82rem;
    text-align: left;
}

@media (max-width: 900px) {
    .site-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 580px) {
    .site-footer {
        margin-top: 3.5rem;
        padding-top: 2.75rem;
    }

    .site-footer-grid {
        grid-template-columns: 1fr;
        gap: 2.25rem;
    }

    .site-footer-bottom {
        margin-top: 2.5rem;
    }
}

/* Old lang switcher removed */
/* Premium Game Mode */
.game-layout {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.game-progress-container {
    width: 100%;
    background: #eef2f6;
    height: 8px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.game-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 10%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-card {
    background: white;
    width: 100%;
    padding: 3rem 2rem;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.02);
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 10;
}

.game-question-header {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 1rem;
}

.game-question-text {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-main);
    margin-bottom: 3rem;
}

.game-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    width: 100%;
}

.option-card {
    background: white;
    border: 2px solid #f1f5f9;
    padding: 2.5rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.option-card:hover:not(.voted) {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.1);
}

.option-card .option-label {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.option-card .option-text {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
}

.option-card.selected {
    border-color: var(--primary);
    background: #f5f3ff;
}

.option-card.voted {
    cursor: default;
}

.option-card .percentage {
    font-size: 2rem;
    font-weight: 900;
    margin-top: 1rem;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease;
}

.option-card.voted .percentage {
    opacity: 1;
    transform: translateY(0);
}

.game-footer {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.next-button {
    background: var(--text-main);
    color: white;
    padding: 1.25rem 4rem;
    border-radius: 99px;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    display: none;
}

.next-button:hover {
    transform: scale(1.05);
    background: #000;
}

@media (max-width: 640px) {
    .game-options {
        grid-template-columns: 1fr;
    }
    .game-question-text {
        font-size: 1.75rem;
    }
}

/* --- Premium Mobile Menu --- */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: scroll; /* Force scrolling */
    -webkit-overflow-scrolling: touch; /* Smooth scroll for iOS */
    padding-bottom: 100px;
    pointer-events: none;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-menu-content {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    text-align: left; /* Better for reading */
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    width: 100%;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.mobile-menu-links-container {
    padding: 0 1.5rem;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.active .mobile-menu-links-container {
    transform: translateY(0);
    opacity: 1;
}

.close-menu {
    font-size: 2.5rem;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.nav-item {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    padding: 1.2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    transition: all 0.3s;
}

.nav-item:active {
    transform: scale(0.95);
    background: var(--primary);
    color: white;
}

.menu-divider {
    height: 1px;
    background: var(--border);
    margin: 1rem 0;
}

@media (max-width: 768px) {
    .desktop-nav { display: none !important; }
    .hamburger { display: flex !important; }
    header .container { padding: 0 1rem !important; }
    .container { padding: 1rem !important; }
    h1 { font-size: clamp(1.6rem, 8vw, 2.2rem); }
    h2 { font-size: clamp(1.2rem, 5vw, 1.6rem); word-break: break-word; }
    .fq-main-header-row { gap:.25rem; }
}

/* Breadcrumbs */
.breadcrumb-container {
    padding: 0;
    margin-top: -0.5rem;
    margin-bottom: 0;
    font-size: 0.85rem;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    color: var(--text-muted, #6c757d);
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    padding: 0 0.5rem;
    color: var(--text-muted, #adb5bd);
    font-weight: 300;
}

.breadcrumb-item a {
    color: var(--text-muted, #6c757d);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-item a:hover {
    color: var(--primary-color, #007bff);
}

.breadcrumb-item.active {
    color: var(--text-main, #343a40);
    font-weight: 500;
}
