/* CSS Variables for Theme Management */
:root {
    --primary-color: #00ADB5;
    --secondary-color: #393E46;
    --dark-color: #222831;
    --light-color: #EEEEEE;
    --accent-color: #FFD369;
    --text-primary: #333333;
    --text-secondary: #666666;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --card-bg: #FFFFFF;
    --border-color: #E0E0E0;
    --hover-bg: #F5F5F5;
    --shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 25px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 12px;
    --border-radius-lg: 20px;
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --text-primary: #EEEEEE;
    --text-secondary: #CCCCCC;
    --bg-primary: #222831;
    --bg-secondary: #393E46;
    --card-bg: #2D3436;
    --border-color: #4A5568;
    --hover-bg: #3A3F47;
    --shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 5px 25px rgba(0, 0, 0, 0.4);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: var(--transition);
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.display-4 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.display-5 {
    font-weight: 600;
    letter-spacing: -0.01em;
}

.text-accent {
    color: var(--accent-color) !important;
}

/* Layout Components */
.main-content {
    padding-top: 76px;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
}

/* Navigation */
.navbar {
    background-color: var(--dark-color) !important;
    backdrop-filter: blur(10px);
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
    transition: var(--transition);
    display: flex;
    align-items: center;
    text-decoration: none;
}

.navbar-brand:hover {
    color: var(--accent-color) !important;
    transform: scale(1.05);
}

.navbar-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.navbar-brand:hover .navbar-logo {
    transform: scale(1.1);
}

.brand-text {
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    color: var(--light-color) !important;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

/* Theme Toggle Button */
#theme-toggle {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    transition: var(--transition);
    border-radius: 50px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#theme-toggle:hover {
    background-color: var(--primary-color);
    color: white;
    transform: rotate(180deg);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(0, 173, 181, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 211, 105, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease-out;
}

.hero-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3.5rem;
    padding: 15px;
    box-shadow: 0 8px 32px rgba(0, 173, 181, 0.3);
    animation: pulse 2s infinite;
}

.hero-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

/* Buttons */
.btn {
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #008B94 100%);
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #008B94 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-pulse {
    animation: pulseButton 1s ease-in-out;
}

@keyframes pulseButton {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 173, 181, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(0, 173, 181, 0);
    }
}

@keyframes slideRight {
    0% {
        transform: translateY(-50%) translateX(0);
        opacity: 0;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-50%) translateX(10px);
        opacity: 0;
    }
}

.auto-advance-indicator {
    pointer-events: none;
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent-color) 0%, #E6BE5A 100%);
    color: var(--dark-color);
    box-shadow: var(--shadow);
}

.btn-accent:hover {
    background: linear-gradient(135deg, #E6BE5A 0%, var(--accent-color) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    color: var(--dark-color);
}

.btn-outline-light {
    border: 2px solid var(--light-color);
    color: var(--light-color);
}

.btn-outline-light:hover {
    background-color: var(--light-color);
    color: var(--dark-color);
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

/* Feature Cards */
.feature-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 173, 181, 0.1), transparent);
    transition: var(--transition);
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

.feature-card h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Quiz Section */
.quiz-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-hover);
    border: 1px solid var(--border-color);
    overflow: hidden;
    animation: slideInUp 0.5s ease-out;
}

.quiz-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem;
    text-align: center;
}

.question-counter {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.question-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.quiz-body {
    padding: 2rem;
}

.quiz-footer {
    padding: 1.5rem 2rem;
    background: var(--bg-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Question Options */
.question-options {
    display: grid;
    gap: 1rem;
}

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

.option-card {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.option-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 173, 181, 0.1), transparent);
    transition: left 0.5s ease;
}

.option-card:hover::after {
    left: 100%;
}

.option-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 6px 25px rgba(0, 173, 181, 0.2);
}

.option-card.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(0, 173, 181, 0.15), rgba(255, 211, 105, 0.15));
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(0, 173, 181, 0.3);
    position: relative;
}

.option-card.selected::before {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    animation: checkmarkAppear 0.3s ease-out;
}

@keyframes checkmarkAppear {
    from {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    to {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.option-card .option-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

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

.option-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Progress Bar */
.progress {
    background-color: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.5s ease;
}

/* Results Section */
.profile-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-hover);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.profile-icon {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    margin: 0 auto 1rem;
    animation: pulse 2s infinite;
}

.profile-stats .stat-box {
    text-align: center;
    padding: 1.25rem 1rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100px;
    transition: var(--transition);
}

.profile-stats .stat-box:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.stat-box strong {
    display: block;
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.stat-box small {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    display: block;
    white-space: nowrap;
}

/* Chart Cards */
.chart-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chart-card h4 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-align: center;
    flex-shrink: 0;
}

.chart-container {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 250px;
    overflow: hidden;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-container canvas {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block;
    box-sizing: border-box;
}

/* FAQ Section */
.accordion-item {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    overflow: hidden;
    background: var(--bg-primary);
    transition: var(--transition);
}

.accordion-item:hover {
    box-shadow: var(--shadow);
}

.accordion-button {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: none;
    font-weight: 600;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.accordion-button i {
    font-size: 1.2rem;
    min-width: 24px;
}

.accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--shadow);
}

.accordion-button:not(.collapsed) i {
    color: var(--accent-color);
}

.accordion-button:focus {
    box-shadow: none;
    border: none;
}

.accordion-button:hover:not(.collapsed) {
    background: linear-gradient(135deg, #008B94, var(--secondary-color));
}

.accordion-body {
    padding: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.accordion-body p {
    margin-bottom: 1rem;
}

.accordion-body p:last-child {
    margin-bottom: 0;
}

/* FAQ Lists */
.faq-list {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0;
}

.faq-list li {
    padding: 0.5rem 0;
    padding-left: 0;
    display: flex;
    align-items: flex-start;
    color: var(--text-secondary);
    line-height: 1.6;
}

.faq-list li i {
    margin-top: 0.25rem;
    flex-shrink: 0;
}

/* FAQ Highlight Box */
.faq-highlight {
    background: var(--bg-secondary);
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    border-radius: var(--border-radius);
}

.faq-highlight ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.5rem;
}

.faq-highlight li {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* FAQ Tips Grid */
.faq-tip {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.faq-tip:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.faq-tip i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}

.faq-tip strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.faq-tip p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.9rem;
}

/* Modal Customization */
.modal-content {
    border-radius: var(--border-radius-lg);
    border: none;
    box-shadow: var(--shadow-hover);
    background: var(--bg-primary);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.modal-title {
    font-weight: 600;
}

.btn-close {
    filter: invert(1);
}

/* Offcanvas Customization */
.offcanvas {
    background: var(--bg-primary);
    border: none;
    box-shadow: var(--shadow-hover);
}

.offcanvas-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.offcanvas-title {
    font-weight: 600;
}

.offcanvas-body {
    padding: 2rem;
}

.strategies-container {
    padding: 0;
}

.strategy-section {
    margin-bottom: 2rem;
}

.strategy-section:last-child {
    margin-bottom: 0;
}

.strategy-section h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    font-weight: 600;
}

.strategy-section h5 i {
    margin-right: 0.5rem;
}

/* Strategy Cards */
.strategy-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.strategy-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.strategy-card h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.strategy-card h5 i {
    margin-right: 0.5rem;
}

.strategy-card p {
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

.strategy-card h6 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.strategy-card h6 i {
    margin-right: 0.5rem;
}

.strategy-card ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.strategy-card ul li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.tools-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.tool-tag {
    display: inline-block;
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
}

.wellness-tips {
    list-style: none;
    padding-left: 0;
}

.wellness-tips li {
    padding-left: 1.5rem;
    position: relative;
}

.wellness-tips li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Profile Explanation Modal */
.profile-explanation {
    padding: 1rem 0;
}

.profile-icon-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    margin: 0 auto 1rem;
}

.explanation-section {
    margin-bottom: 2rem;
}

.explanation-section h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.explanation-section h5 i {
    margin-right: 0.5rem;
}

.explanation-section p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.characteristics-list {
    list-style: none;
    padding-left: 0;
}

.characteristics-list li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.characteristics-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

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

.technique-badge {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    text-align: center;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.technique-badge:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Privacy Page Styles */
.privacy-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    box-shadow: var(--shadow-hover);
}

.privacy-section {
    margin-bottom: 3rem;
}

.privacy-section h2 {
    color: var(--text-primary);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.privacy-section h2 i {
    font-size: 1.5rem;
}

.privacy-box {
    background: var(--bg-secondary);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

.privacy-box h4 {
    color: var(--text-primary);
}

.privacy-list {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0;
}

.privacy-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.7;
}

.privacy-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.privacy-highlight {
    background: linear-gradient(135deg, rgba(0, 173, 181, 0.1), rgba(255, 211, 105, 0.1));
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin: 1.5rem 0;
}

.privacy-highlight h4 {
    color: var(--primary-color);
}

.contact-box {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.contact-box a {
    color: var(--primary-color);
    text-decoration: none;
}

.contact-box a:hover {
    text-decoration: underline;
}

.rights-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    height: 100%;
}

.rights-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.rights-card i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.75rem;
}

.rights-card strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: var(--light-color);
    margin-top: auto;
}

.footer p {
    margin: 0;
    font-size: 0.9rem;
}

.footer a {
    color: var(--light-color);
    text-decoration: none;
    transition: var(--transition);
}

.footer a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Ad Container */
.ad-container {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--border-color);
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Loading Animation */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        padding-top: 60px;
    }
    
    .hero-section {
        text-align: center;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .hero-icon {
        width: 100px;
        height: 100px;
        font-size: 3rem;
        padding: 12px;
    }
    
    .navbar-logo {
        height: 32px;
    }
    
    .brand-text {
        font-size: 1.25rem;
    }
    
    .accordion-button {
        padding: 1.25rem;
        font-size: 0.95rem;
    }
    
    .accordion-button i {
        font-size: 1rem;
        min-width: 20px;
    }
    
    .faq-tip {
        padding: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .faq-tip i {
        font-size: 1.75rem;
    }
    
    .privacy-icon {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
    
    .privacy-section h2 {
        font-size: 1.5rem;
    }
    
    .privacy-box {
        padding: 1.25rem;
    }
    
    .rights-card {
        margin-bottom: 1rem;
    }
    
    .footer {
        text-align: center;
    }
    
    .footer .text-md-end {
        text-align: center !important;
        margin-top: 0.5rem;
    }
    
    .feature-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .quiz-header,
    .quiz-body {
        padding: 1.5rem;
    }
    
    .quiz-footer {
        padding: 1rem 1.5rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .profile-card {
        padding: 1.5rem;
    }
    
    .profile-icon {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }
    
    .profile-stats .stat-box {
        padding: 1rem 0.75rem;
        min-height: 90px;
    }
    
    .stat-box strong {
        font-size: 1rem;
        margin-bottom: 0.4rem;
    }
    
    .stat-box small {
        font-size: 0.85rem;
    }
    
    .chart-card {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .chart-card h4 {
        margin-bottom: 1rem;
        font-size: 1.1rem;
    }
    
    .chart-container {
        width: 100%;
        height: auto;
        min-height: 300px;
        padding: 0.5rem;
    }
    
    .chart-container canvas {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
    }
    
    .action-buttons-container {
        padding: 0 0.5rem;
    }
    
    .action-buttons-container .d-flex {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .action-buttons-container .btn {
        width: 100%;
        margin: 0 !important;
        padding: 0.75rem 1rem;
    }
    
    .question-options {
        grid-template-columns: 1fr;
    }
    
    .option-card {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 1rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 0.6rem 1.5rem;
        font-size: 1rem;
    }
    
    .hero-stats .row {
        text-align: center;
    }
    
    .stat-item h3 {
        font-size: 1.5rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .quiz-footer {
        flex-direction: column-reverse;
    }
    
    .quiz-footer .btn {
        width: 100%;
    }
    
    .profile-stats .row {
        margin: 0;
    }
    
    .profile-stats .stat-box {
        padding: 1.25rem 0.5rem;
        min-height: 100px;
        margin-bottom: 0.75rem;
    }
    
    .stat-box strong {
        font-size: 0.95rem;
        line-height: 1.3;
        padding: 0 0.25rem;
    }
    
    .stat-box small {
        font-size: 0.8rem;
    }
    
    .chart-card {
        padding: 0.75rem;
        margin-bottom: 1.5rem;
    }
    
    .chart-card h4 {
        margin-bottom: 0.75rem;
        font-size: 1rem;
    }
    
    .chart-container {
        width: 100%;
        height: auto;
        min-height: 250px;
        padding: 0.25rem;
    }
    
    .chart-container canvas {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
    }
    
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
        --shadow-hover: 0 5px 25px rgba(0, 0, 0, 0.4);
    }
    
    .btn {
        border: 2px solid currentColor;
    }
    
    .feature-card,
    .quiz-card,
    .profile-card,
    .chart-card {
        border: 2px solid var(--border-color);
    }
}

/* Saved Results Cards */
.saved-result-card {
    transition: var(--transition);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.saved-result-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.result-card-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.result-card-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.result-card-stats .stat-item i {
    width: 20px;
    text-align: center;
}

/* Share Modal */
#share-text-area {
    font-family: monospace;
    font-size: 0.9rem;
    resize: vertical;
}

/* Action Buttons Container */
.action-buttons-container {
    margin-top: 2rem;
}

.action-buttons-container .d-flex {
    gap: 0.75rem;
    align-items: center;
}

/* Toast Notifications */
.custom-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    max-width: 500px;
    border-radius: 12px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    /* Solid backgrounds for better readability */
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Theme-specific toast backgrounds */
[data-theme="light"] .custom-toast {
    background: #FFFFFF;
    border: 2px solid #E0E0E0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .custom-toast {
    background: #2D3436;
    border: 2px solid #404040;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* Toast type variations */
.toast-error {
    border-left: 4px solid #dc3545;
}

.toast-success {
    border-left: 4px solid #28a745;
}

.toast-info {
    border-left: 4px solid #17a2b8;
}

.custom-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: flex-start;
    padding: 1.25rem;
    gap: 1rem;
    background: transparent;
}

.toast-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.toast-error .toast-icon {
    color: #FFFFFF;
    background: #dc3545;
}

.toast-success .toast-icon {
    color: #FFFFFF;
    background: #28a745;
}

.toast-info .toast-icon {
    color: #FFFFFF;
    background: #17a2b8;
}

.toast-message {
    flex: 1;
    min-width: 0;
}

.toast-message strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.toast-message p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    opacity: 0.7;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
    opacity: 1;
}

[data-theme="dark"] .toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Buttons inside toast messages */
.toast-message .btn {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.toast-message .btn-danger {
    background: #dc3545;
    border-color: #dc3545;
    color: #FFFFFF;
}

.toast-message .btn-danger:hover {
    background: #c82333;
    border-color: #bd2130;
    color: #FFFFFF;
}

.toast-message .btn-secondary {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.toast-message .btn-secondary:hover {
    background: var(--hover-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 12px;
}

.loading-spinner {
    text-align: center;
    color: var(--text-primary);
}

.loading-spinner .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
}

.loading-spinner p {
    margin-top: 1rem;
    font-size: 1rem;
    color: var(--text-primary);
}

/* Toast Responsive Styles */
@media (max-width: 576px) {
    .navbar-logo {
        height: 28px;
    }
    
    .brand-text {
        font-size: 1.1rem;
    }
    
    .hero-icon {
        width: 80px;
        height: 80px;
        padding: 10px;
    }
    
    .custom-toast {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .custom-toast.show {
        transform: translateY(0);
    }
    
    .toast-content {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .toast-message strong {
        font-size: 0.95rem;
    }
    
    .toast-message p {
        font-size: 0.85rem;
    }
    
    .toast-message .d-flex {
        flex-direction: column;
    }
    
    .toast-message .btn {
        width: 100%;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .focus-circle,
    .feature-card,
    .btn {
        transform: none !important;
    }
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .ad-container {
        display: none !important;
    }
    
    .main-content {
        padding-top: 0;
    }
    
    .hero-section,
    .feature-card,
    .quiz-card,
    .profile-card {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
