/*
Theme Name: TrendQuiz
Theme URI: https://example.com/trendquiz
Author: Expert WP Dev
Description: A custom theme specifically crafted for quizzes, games, and trendy activities.
Version: 2.4
Tags: custom-background, custom-logo, custom-menu, entertainment
Text Domain: trendquiz
*/

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f4f9;
}

/* =======================================
   HEADER & NAVIGATION
   ======================================= */
.site-header {
    background-color: #8562c3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    height: var(--header-height, 80px);
    color: #fff;
    box-sizing: border-box;
}

.site-branding a {
    color: #fff;
    text-decoration: none;
    font-size: 28px;
    font-weight: bold;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 30px;
    flex: 1;
}

.main-navigation {
    margin-left: auto;
}

.main-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
    justify-content: flex-end;
}

.main-navigation a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: opacity 0.3s;
}

.main-navigation a:hover {
    opacity: 0.8;
}

.user-auth-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    background: rgba(0,0,0,0.15);
    padding: 8px 15px;
    border-radius: 20px;
    transition: background 0.3s;
    cursor: pointer;
    flex-shrink: 0;
}

.user-auth-link:hover {
    background: rgba(0,0,0,0.25);
}

.user-auth-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* =======================================
   HERO & MAIN CONTENT
   ======================================= */
.hero-section {
    width: 100%;
    max-width: 1200px;
    margin: 25px auto 0;
    padding: 0 5%;
    box-sizing: border-box;
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.site-main {
    padding: 40px 5%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.site-page {
    padding: 40px 5%;
    max-width: 1200px;
    margin: 0 auto;
    display: block;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-top: 40px;
}

.site-page h1.entry-title {
    color: #8562c3;
    text-align: center;
    margin-bottom: 30px;
    font-size: 32px;
}

.entry-content {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

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

.card-content {
    padding: 20px;
}

.card-title {
    margin: 0 0 10px;
    font-size: 20px;
    color: #333;
}

/* =======================================
   FOOTER & FOOTER MENU
   ======================================= */
.site-footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
}

.footer-navigation {
    margin-bottom: 20px;
}

.footer-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-navigation a {
    color: #bbb;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.3s;
}

.footer-navigation a:hover {
    color: #fff;
}

.footer-inner p {
    margin: 5px 0;
    color: #999;
    font-size: 14px;
}

/* =======================================
   BUTTONS
   ======================================= */
.tq-btn {
    display: inline-block;
    padding: 12px 20px;
    background: #8562c3;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: background 0.3s;
}
.tq-btn:hover {
    background: #6d4b9f;
}

/* =======================================
   AJAX MODAL / POPUP
   ======================================= */
.tq-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
}

.tq-modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.tq-close {
    position: absolute;
    right: 20px;
    top: 15px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.tq-close:hover {
    color: #333;
}

.tq-mobile-menu-wrap {
    display: none;
}

.tq-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.tq-tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    color: #888;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: 0.3s;
}

.tq-tab.active {
    color: #8562c3;
    border-bottom: 3px solid #8562c3;
}

.tq-form-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tq-form-container input {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
}

.tq-form-container button {
    background-color: #8562c3;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
}

.tq-form-container button:hover {
    background-color: #6d4b9f;
}

.tq-msg {
    text-align: center;
    font-size: 14px;
    margin: 10px 0 0;
    padding: 10px;
    border-radius: 4px;
    display: none;
}
.tq-msg.error { background: #fee; color: #c00; }
.tq-msg.success { background: #efe; color: #080; }

/* =======================================
   CUSTOM DASHBOARD LAYOUT
   ======================================= */
.tq-dashboard-wrapper {
    display: flex;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 5%;
    gap: 30px;
    min-height: 60vh;
}

.tq-sidebar {
    width: 250px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    padding: 20px 0;
    height: fit-content;
}

.tq-sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tq-sidebar-menu li {
    border-bottom: 1px solid #eee;
}

.tq-sidebar-menu li:last-child {
    border-bottom: none;
}

.tq-sidebar-menu a {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.tq-sidebar-menu a:hover, .tq-sidebar-menu a.active {
    background: #8562c3;
    color: #fff;
}

.tq-dashboard-content {
    flex: 1;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    padding: 30px;
}

.tq-dashboard-content h1 {
    margin-top: 0;
    color: #8562c3;
    font-size: 28px;
}

.tq-dashboard-content h2 {
    color: #555;
    font-size: 20px;
    margin-top: 5px;
}

/* =======================================
   RESPONSIVE DESIGN (MOBILE & TABLET)
   ======================================= */
@media (max-width: 768px) {
    .tq-dashboard-wrapper {
        flex-direction: column;
    }
    .tq-sidebar {
        width: 100%;
    }
    
    .user-auth-link span {
        display: none;
    }
    .user-auth-link {
        padding: 10px;
        border-radius: 50%;
        gap: 0;
    }

    .main-navigation {
        display: none;
    }

    .tq-modal-content {
        margin: 0;
        width: 100%;
        max-width: 100%;
        height: 100vh;
        border-radius: 0;
        padding: 60px 20px 20px 20px;
        overflow-y: auto;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
    }

    .tq-mobile-menu-wrap {
        display: block;
        margin-bottom: 30px;
        border-bottom: 2px solid #eee;
        padding-bottom: 20px;
        text-align: center;
    }
    .tq-mobile-menu-wrap ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    .tq-mobile-menu-wrap ul li {
        margin-bottom: 15px;
    }
    .tq-mobile-menu-wrap ul li a {
        display: inline-block;
        padding: 10px 20px;
        color: #8562c3;
        text-decoration: none;
        font-size: 22px;
        font-weight: bold;
    }
}
