/* =========================================================================
   Component Styles
   Contains styles for reusable UI components like Modals, Buttons, Forms, etc.
   ========================================================================= */

/* --- Modals ------------------------------------------------------------- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    transition: opacity 0.3s ease;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
    display: none;
    /* Often overridden by JS class removal, but good fallback */
}

.modal-text-center {
    text-align: center;
}


.modal-content-wrapper {
    /* Base style for modal content wrappers */
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    /* Glassmorphism handled by .glass-panel usually */
}

/* Specific Modal Sizes */
.modal-sm {
    max-width: 340px;
}

.modal-md {
    max-width: 420px;
}

.modal-lg {
    max-width: 600px;
}

.modal-padding-sm {
    padding: 20px;
}

.modal-padding-md {
    padding: 25px;
}

.modal-padding-lg {
    padding: 30px;
}

/* Close Buttons */
.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10;
}

.modal-close-btn:hover {
    color: #fff;
}

.modal-close-btn.lg {
    font-size: 1.5rem;
    padding: 10px;
    top: 10px;
    right: 10px;
}

/* Modal Headers */
.modal-title {
    margin-bottom: 5px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    text-align: center;
}

.modal-subtitle {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.4;
}

/* --- Forms & Inputs ----------------------------------------------------- */
.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-label {
    display: block;
    color: #ddd;
    font-size: 0.8rem;
    margin-bottom: 6px;
}

.input-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.input-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.radio-btn-label {
    padding: 10px;
    border: 1px solid #444;
    border-radius: 8px;
    text-align: center;
    color: #aaa;
    cursor: pointer;
    font-size: 0.9rem;
    background: transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radio-btn-label:hover {
    border-color: #666;
    background: rgba(255, 255, 255, 0.05);
}

.radio-btn-label.active,
input[type="radio"]:checked+.radio-btn-label {
    border-color: var(--accent-color, #00ff88);
    color: #fff;
    background: rgba(0, 255, 136, 0.1);
    font-weight: 600;
}

/* Compact versions */
.radio-btn-label.compact {
    padding: 8px;
    border-radius: 6px;
    font-size: 0.85rem;
}

/* --- Buttons ------------------------------------------------------------ */
.btn-primary-full {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    margin-top: 10px;
    border-radius: 8px;
    background: var(--accent-color, #00ff88);
    color: #000;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: transform 0.1s;
}

.btn-primary-full:active {
    transform: scale(0.98);
}

/* --- Specific Section Styles (Golf Wear) -------------------------------- */
.golf-wear-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    position: relative;
    padding-top: 10px;
    /* Space for close button if absolute */
}

.golf-wear-back-btn {
    position: absolute;
    left: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 5px;
}

.step-guide-text {
    color: #ccc;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.region-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.region-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #eee;
    padding: 15px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.region-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.time-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #eee;
    padding: 15px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.time-btn i {
    font-size: 1.2rem;
    margin-bottom: 3px;
}

.time-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color, #00ff88);
    color: #fff;
}

/* --- FAQ Styles --------------------------------------------------------- */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
}

.faq-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 8px;
    font-weight: 600;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.faq-answer {
    color: #aaa;
    font-size: 0.9rem;
    line-height: 1.6;
    padding-left: 0;
}

/* --- Donation Styles ---------------------------------------------------- */
.donation-icon {
    font-size: 2rem;
    color: #ffbc00;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px rgba(255, 188, 0, 0.3));
}

.account-box {
    background: rgba(255, 255, 255, 0.08);
    padding: 15px 25px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    max-width: 100%;
    margin-bottom: 25px;
}

.account-box:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}

.tos-content {
    color: #ccc;
    font-size: 0.85rem;
    line-height: 1.6;
    text-align: left;
}

.tos-header {
    color: #fff;
    margin-top: 15px;
    margin-bottom: 5px;
    font-size: 0.95rem;
    font-weight: 600;
}

/* --- Utility Buttons (Landing Page More Menu) -------------------------- */
.utility-btn {
    background: rgba(255, 255, 255, 0.05);
    color: #aaa;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 12px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Persistent Highlight for Gold Button */
.utility-btn.gold {
    border-color: #ffd700;
    color: #ffd700;
    background: rgba(255, 215, 0, 0.05);
}

/* New: Persistent Highlight for Purple Button (Fortune) */
.utility-btn.purple {
    border-color: #d500f9;
    color: #d500f9;
    background: rgba(213, 0, 249, 0.05);
}

/* Utility Button Hover Effects - Desktop Only */
@media (hover: hover) {
    .utility-btn:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.3);
        transform: translateY(-2px);
    }

    .utility-btn.accent:hover {
        background: rgba(0, 255, 136, 0.1);
        border-color: var(--accent-color);
        color: var(--accent-color);
    }

    .utility-btn.blue:hover {
        background: rgba(77, 171, 247, 0.1);
        border-color: #4dabf7;
        color: #4dabf7;
    }

    .utility-btn.red:hover {
        background: rgba(255, 107, 107, 0.1);
        border-color: #ff6b6b;
        color: #ff6b6b;
    }

    .utility-btn.pink:hover {
        background: rgba(255, 100, 200, 0.1);
        border-color: #ff64c8;
        color: #ff64c8;
    }

    .utility-btn.gold:hover {
        background: rgba(255, 215, 0, 0.1);
        border-color: #ffd700;
        color: #ffd700;
    }

    .utility-btn.purple:hover {
        background: rgba(213, 0, 249, 0.1);
        border-color: #d500f9;
        color: #d500f9;
    }
}

/* --- Landing Page Action Buttons ------------------------------------ */
.landing-action-btn {
    border-radius: 12px;
    padding: 14px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 500;
    min-height: 70px;
}

.landing-action-btn.profile {
    border: 1px solid rgba(0, 255, 136, 0.3);
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1) 0%, rgba(0, 255, 136, 0.03) 100%);
    color: #eee;
}

.landing-action-btn.profile:hover {
    background: rgba(0, 255, 136, 0.15);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.landing-action-btn.install {
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    color: #aaa;
    width: 100%;
}

.landing-action-btn.install:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* --- Toggle Button (More Menu) --------------------------------------- */
.toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    color: #aaa;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.85rem;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* --- Gender Selector Buttons ----------------------------------------- */
.gender-btn {
    flex: 1;
    max-width: 100px;
    padding: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #888;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gender-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.gender-btn.active {
    background: rgba(0, 255, 136, 0.15) !important;
    border-color: var(--accent-color) !important;
    color: #fff !important;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}

.gender-btn.active i {
    color: var(--accent-color);
}

/* --- Policy Links ---------------------------------------------------- */
.policy-link {
    color: #666;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.3s;
}

.policy-link:hover {
    color: #aaa;
}

.policy-separator {
    color: #444;
}

/* --- AI Summary Box (Analysis Result) ------------------------------- */
.ai-summary-box {
    margin: 20px;
    padding: 25px;
    border: 2px solid #00ff88;
    border-radius: 20px;
    background: rgba(0, 255, 136, 0.05);
    position: relative;
    transition: all 0.5s ease;
}

.ai-summary-quote {
    position: absolute;
    color: #00ff88;
    font-size: 1.2rem;
    opacity: 0.8;
}

.ai-summary-quote.left {
    top: 15px;
    left: 15px;
}

.ai-summary-quote.right {
    bottom: 15px;
    right: 15px;
}

.ai-summary-text {
    margin: 0;
    padding: 0 15px;
    font-size: 1rem;
    line-height: 1.6;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* --- Slider Dots ---------------------------------------------------- */
.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
    opacity: 0.5;
}

.slider-dot.active {
    background: var(--accent-color);
    opacity: 1;
}

/* --- Peer Summary Box ------------------------------------------------ */
.peer-summary-box {
    display: none;
    margin: 15px auto 5px auto;
    text-align: center;
    font-size: 0.9rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 90%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* --- Landing Page Utilities ------------------------------------------- */
.landing-utility-container {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    position: relative;
    z-index: 100;
    width: 100%;
    max-width: 340px;
}

.landing-grid-2cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
}

.landing-btn-text {
    font-size: 0.8rem;
    text-align: center;
    line-height: 1.2;
}

.landing-subtext {
    text-align: center;
    font-size: 0.7rem;
    color: #666;
    margin-top: -4px;
    line-height: 1.3;
}

.more-menu-wrapper {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.3s;
    opacity: 0;
}

.more-menu-inner {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 5px;
}

.service-guide-box {
    margin-top: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
    color: #777;
    font-size: 0.85rem;
    line-height: 1.6;
}

.service-guide-section {
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
    margin-top: 25px;
    margin-bottom: 20px;
}

.service-guide-section.footer-guide {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

.donation-link {
    margin-top: 25px;
    color: #555;
    font-size: 0.75rem;
    text-decoration: underline;
    cursor: pointer;
    text-align: center;
    transition: color 0.3s;
}

.policy-links-container {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
    max-width: 340px;
}

.policy-links-wrapper {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.75rem;
}

/* --- Result Dashboard Elements ---------------------------------------- */
.dashboard-slider-outer {
    position: relative;
    width: 100%;
    margin-top: 10px;
}

.dashboard-slider-container {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.dashboard-slider-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    touch-action: pan-y;
}

.dashboard-card-slide {
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 15px 12px;
}

.score-content-wrapper {
    text-align: center;
    color: #00ff88;
    transition: color 0.5s ease;
}

.result-rank-text {
    font-family: 'Arial Black', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: currentColor;
    text-shadow: 0 0 20px currentColor;
}

.result-percentile-text {
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.9;
    color: #fff;
    letter-spacing: 1px;
    white-space: pre-wrap;
}

.result-score-value {
    font-size: 8.5rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -6px;
    color: currentColor;
    text-shadow: 0 0 40px currentColor;
}

.result-score-divider {
    width: 50px;
    height: 4px;
    background: currentColor;
    margin: 0 auto 30px auto;
    border-radius: 2px;
    box-shadow: 0 0 15px currentColor;
    opacity: 0.8;
}

.result-quality-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 8px;
}

.result-quality-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #aaa;
    letter-spacing: 1px;
}

.result-quality-percentage {
    font-size: 1.2rem;
    font-weight: 800;
    color: currentColor;
}

.result-quality-bar-bg {
    width: 70%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin: 0 auto;
    overflow: hidden;
}

.result-quality-bar-fill {
    height: 100%;
    width: 0%;
    background: currentColor;
    box-shadow: 0 0 15px currentColor;
    border-radius: 4px;
    transition: width 1s ease;
}

.result-metrics-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* --- Ask Pro Button (Restored) --------------------------------------- */
.ask-pro-btn-wrapper {
    margin: 20px 0;
    width: 100%;
}

.ask-pro-content {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 16px;
    padding: 15px;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ask-pro-content:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.15);
}

.ask-pro-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid #00ff88;
    background: #000;
}

.ask-pro-text-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.ask-pro-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ask-pro-subtitle {
    font-size: 0.8rem;
    color: #aaa;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Refined More Menu (Unified Grid) --- */
.more-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 10px 5px;
}

/* Section Header (Spans full width) */
.menu-header-item {
    grid-column: 1 / -1;
    margin-top: 25px;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 5px;
}

.menu-header-item::before {
    content: '';
    display: block;
    width: 4px;
    height: 14px;
    background: #00ff88;
    border-radius: 2px;
}

.menu-header-item.shop-header {
    color: #ff6b6b;
}

.menu-header-item.shop-header::before {
    background: #ff6b6b;
}

/* Wide Shop Button */
.shop-item-full {
    grid-column: 1 / -1;
    /* Spans 2 columns */
}

.shop-wide-btn {
    width: 100%;
    display: flex;
    justify-content: space-between !important;
    align-items: center;
    padding: 15px 20px !important;
    min-height: 60px;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(255, 107, 107, 0.05));
    border: 1px solid rgba(255, 107, 107, 0.4) !important;
    color: #ff6b6b !important;
    border-radius: 16px !important;
    transition: all 0.2s ease;
}

.shop-wide-btn:hover {
    background: rgba(255, 107, 107, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.15);
}

.shop-content-row {
    text-align: left;
}

.shop-content-row span {
    font-size: 0.95rem !important;
    font-weight: 800;
    color: #ff6b6b;
    display: block;
    margin-bottom: 2px;
}

.shop-content-row small {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}
}

/* --- Refined More Menu (Unified Grid) --- */
.more-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 10px 5px;
}

/* Section Header (Spans full width) */
.menu-header-item {
    grid-column: 1 / -1;
    margin-top: 20px;
    margin-bottom: 5px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-header-item::before {
    content: '';
    display: block;
    width: 4px;
    height: 12px;
    background: #00ff88;
    border-radius: 2px;
}

.menu-header-item.shop-header::before {
    background: #ff6b6b;
}

/* Wide Shop Button */
.shop-item-full {
    grid-column: 1 / -1;
    /* Spans 2 columns */
}

.shop-wide-btn {
    width: 100%;
    display: flex;
    justify-content: space-between !important;
    align-items: center;
    padding: 15px 20px !important;
    min-height: 60px;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.15), rgba(255, 107, 107, 0.05));
    border: 1px solid rgba(255, 107, 107, 0.4) !important;
    color: #ff6b6b !important;
    border-radius: 16px !important;
    transition: all 0.2s ease;
}

.shop-wide-btn:hover {
    background: rgba(255, 107, 107, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.2);
}

.shop-content-row {
    text-align: left;
}

.shop-content-row span {
    font-size: 0.95rem !important;
    font-weight: 800;
    color: #ff6b6b;
    display: block;
    margin-bottom: 2px;
}

.shop-content-row small {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}