/**
 * FundSwipe Styles
 * Phase 3 - Tinder-Style Fund Matching
 *
 * Features:
 * - Card stack with depth effect
 * - Swipe gesture animations (left/right/up)
 * - Questionnaire with interactive options
 * - Results screen with matched portfolio
 * - Liquid Glass theme integration
 *
 * @version 1.0.0
 */

/* ===== SCREEN MANAGEMENT ===== */

.swipe-screen {
    display: none;
    width: 100%;
    min-height: 100%;
    padding: 30px 20px;
    overflow-y: auto;
}

.swipe-screen.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 40px;
    padding-bottom: 40px;
}

/* ===== QUESTIONNAIRE STYLES ===== */

.questionnaire-container {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

.questionnaire-header {
    text-align: center;
    margin-bottom: 40px;
}

.questionnaire-header h1 {
    font-size: 36px;
    font-weight: 700;
    color: var(--starlink-cyan);
    margin-bottom: 12px;
}

.questionnaire-header p {
    font-size: 16px;
    color: var(--text-muted);
}

.questionnaire-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.question-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 32px;
    transition: all 0.3s ease;
}

.question-card h3 {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.option-card {
    position: relative;
    cursor: pointer;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.option-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.option-content {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.option-card:hover .option-content {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateY(-4px);
}

.option-card input:checked + .option-content {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(124, 58, 237, 0.2));
    border-color: var(--starlink-cyan);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

.option-emoji {
    font-size: 40px;
    margin-bottom: 12px;
}

.option-label {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.option-desc {
    color: var(--text-muted);
    font-size: 13px;
}

.btn-start-swiping {
    background: linear-gradient(135deg, var(--starlink-cyan), var(--starlink-purple));
    color: white;
    border: none;
    padding: 18px 48px;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.4);
    margin-top: 20px;
    width: 100%;
}

.btn-start-swiping:hover:not(:disabled) {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 212, 255, 0.6);
}

.btn-start-swiping:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== SWIPE CONTAINER ===== */

.swipe-container {
    max-width: 600px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 0 auto;
}

/* Swipe Stats */
.swipe-stats {
    display: flex;
    justify-content: space-around;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.stat-value {
    display: block;
    color: var(--starlink-cyan);
    font-size: 28px;
    font-weight: 700;
}

/* ===== CARD STACK ===== */

.card-stack {
    position: relative;
    width: 100%;
    min-height: 450px;
    max-height: 70vh;
    perspective: 1000px;
    margin-bottom: 20px;
}

.fund-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    padding: 32px 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    cursor: grab;
    touch-action: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center center;
    display: flex;
    flex-direction: column;
}

.fund-card:active {
    cursor: grabbing;
}

/* Stacked card depth effect */
.fund-card:nth-child(2) {
    transform: scale(0.95) translateY(10px);
    opacity: 0.8;
    z-index: -1;
}

.fund-card:nth-child(3) {
    transform: scale(0.9) translateY(20px);
    opacity: 0.6;
    z-index: -2;
}

/* Card swiping states */
.fund-card.swiping-left {
    border-color: var(--starlink-red);
    box-shadow: 0 20px 60px rgba(255, 51, 51, 0.6);
}

.fund-card.swiping-right {
    border-color: var(--starlink-green);
    box-shadow: 0 20px 60px rgba(0, 255, 0, 0.6);
}

.fund-card.swiping-up {
    border-color: var(--starlink-cyan);
    box-shadow: 0 20px 60px rgba(0, 212, 255, 0.8);
}

/* Card Content */
.fund-card-header {
    margin-bottom: 24px;
    text-align: center;
}

.fund-card-title {
    color: var(--starlink-cyan);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

.fund-card-manager {
    color: var(--text-muted);
    font-size: 14px;
}

.fund-card-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

.fund-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.metric-label {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
}

.fund-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.fund-tag {
    background: rgba(0, 212, 255, 0.2);
    border: 1px solid var(--starlink-cyan);
    color: var(--starlink-cyan);
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Swipe indicators */
.swipe-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 100px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 10;
}

.swipe-indicator.nope {
    left: 40px;
}

.swipe-indicator.like {
    right: 40px;
}

.swipe-indicator.super {
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.fund-card.swiping-left .swipe-indicator.nope,
.fund-card.swiping-right .swipe-indicator.like,
.fund-card.swiping-up .swipe-indicator.super {
    opacity: 1;
}

/* ===== SWIPE ACTIONS ===== */

.swipe-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.action-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
}

.action-btn:hover {
    transform: scale(1.1);
}

.action-btn:active {
    transform: scale(0.95);
}

.action-btn-pass {
    background: linear-gradient(135deg, rgba(255, 51, 51, 0.3), rgba(255, 51, 51, 0.2));
    border: 2px solid var(--starlink-red);
}

.action-btn-pass:hover {
    box-shadow: 0 8px 32px rgba(255, 51, 51, 0.6);
}

.action-btn-like {
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.3), rgba(0, 255, 0, 0.2));
    border: 2px solid var(--starlink-green);
}

.action-btn-like:hover {
    box-shadow: 0 8px 32px rgba(0, 255, 0, 0.6);
}

.action-btn-super {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.3), rgba(124, 58, 237, 0.3));
    border: 2px solid var(--starlink-cyan);
    width: 80px;
    height: 80px;
}

.action-btn-super:hover {
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.8);
}

.action-icon {
    font-size: 32px;
}

.action-label {
    color: var(--text-primary);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Build Portfolio Button */
.btn-build-portfolio {
    background: linear-gradient(135deg, var(--starlink-cyan), var(--starlink-purple));
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.4);
    width: 100%;
}

.btn-build-portfolio:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 212, 255, 0.6);
}

/* ===== RESULTS SCREEN ===== */

.results-container {
    max-width: 900px;
    width: 100%;
}

.results-header {
    text-align: center;
    margin-bottom: 40px;
}

.results-header h1 {
    font-size: 36px;
    font-weight: 700;
    color: var(--starlink-cyan);
    margin-bottom: 12px;
}

.results-header p {
    font-size: 16px;
    color: var(--text-muted);
}

.results-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.result-fund-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 24px;
    transition: all 0.3s ease;
}

.result-fund-card:hover {
    border-color: rgba(0, 212, 255, 0.4);
    transform: translateY(-2px);
}

.result-fund-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 16px;
}

.result-fund-info h3 {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.result-fund-info p {
    color: var(--text-muted);
    font-size: 14px;
}

.allocation-badge {
    background: linear-gradient(135deg, var(--starlink-cyan), var(--starlink-purple));
    color: white;
    font-size: 20px;
    font-weight: 700;
    padding: 12px 20px;
    border-radius: 12px;
}

.result-fund-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.result-metric {
    text-align: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

.result-metric-value {
    color: var(--starlink-cyan);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.result-metric-label {
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
}

/* Results Actions */
.results-actions {
    display: flex;
    gap: 16px;
}

.btn-action {
    flex: 1;
    padding: 16px 32px;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-action.btn-primary {
    background: linear-gradient(135deg, var(--starlink-cyan), var(--starlink-purple));
    color: white;
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.4);
}

.btn-action.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 212, 255, 0.6);
}

.btn-action.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.btn-action.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--starlink-cyan);
}

/* ===== RESPONSIVE ===== */

/* Tablet (iPad) */
@media (max-width: 1024px) and (min-width: 769px) {
    .card-stack {
        height: 520px;
        max-width: 500px;
    }

    .fund-card {
        padding: 35px;
    }

    .fund-card-title {
        font-size: 24px;
    }

    .action-btn {
        width: 70px;
        height: 70px;
    }

    .action-btn-super {
        width: 80px;
        height: 80px;
    }

    .result-fund-metrics {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .swipe-screen {\n        padding: 20px 15px;
    }

    .swipe-screen.active {
        padding-top: 30px;
        padding-bottom: 30px;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .card-stack {
        height: 450px;
        max-height: 65vh;
    }

    .fund-card {
        padding: 24px 20px;
    }

    .fund-card-title {
        font-size: 20px;
    }

    .action-btn {
        width: 64px;
        height: 64px;
    }

    .action-btn-super {
        width: 74px;
        height: 74px;
    }

    .action-icon {
        font-size: 28px;
    }

    .result-fund-metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .results-actions {
        flex-direction: column;
    }
}

/* ===== EMPTY STATE ===== */

.empty-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--text-muted);
}

.empty-stack-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-stack h3 {
    color: var(--text-primary);
    font-size: 24px;
    margin-bottom: 12px;
}

.empty-stack p {
    font-size: 16px;
}
