﻿
.input-group-custom {
    margin-bottom: 25px;
}

.input-label {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
    font-size: 1rem;
    gap: 8px;
}

    .input-label i {
        color: #667eea;
        font-size: 1.1rem;
    }

.tooltip-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-size: 0.75rem;
    cursor: help;
    position: relative;
    font-weight: 600;
}

    .tooltip-icon:hover .tooltip-text {
        visibility: visible;
        opacity: 1;
    }

.tooltip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    z-index: 1000;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #2d3748;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 400;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

    .tooltip-text::after {
        content: "";
        position: absolute;
        top: 100%;
        left: 50%;
        margin-left: -5px;
        border-width: 5px;
        border-style: solid;
        border-color: #2d3748 transparent transparent transparent;
    }

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #48bb78;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: #2d3748;
    font-weight: 500;
}

    .form-input:focus {
        outline: none;
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }

.input-range {
    font-size: 0.85rem;
    color: #718096;
    margin-top: 5px;
    font-style: italic;
}

.input-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.result-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

    .result-item:hover {
        border-color: #667eea;
        transform: translateX(5px);
    }

.result-item-label {
    font-size: 0.95rem;
    color: #718096;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .result-item-label i {
        color: #667eea;
    }

.result-item-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3748;
}

.result-item-sub {
    font-size: 0.9rem;
    color: #a0aec0;
    margin-top: 5px;
}

.addiction-badge {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 10px 0;
    animation: pulse 2s infinite;
}

.addiction-healthy {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.addiction-mild {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.addiction-moderate {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
}

.addiction-severe {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.addiction-extreme {
    background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
    color: white;
    animation: shake 0.5s infinite;
}

.addiction-description {
    font-size: 1rem;
    color: #4a5568;
    line-height: 1.6;
    padding: 15px;
    background: #f7fafc;
    border-radius: 8px;
    margin-top: 10px;
}

.suggestion-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.suggestion-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
}

.suggestion-desc {
    font-size: 0.95rem;
    color: #718096;
    line-height: 1.5;
}

.shocking-facts {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #f59e0b;
    margin: 20px 0;
}

    .shocking-facts h4 {
        color: #92400e;
        margin-bottom: 15px;
        font-weight: 700;
    }

    .shocking-facts ul {
        list-style: none;
        padding: 0;
    }

    .shocking-facts li {
        color: #78350f;
        padding: 8px 0;
        font-weight: 500;
    }

.spinner {
    display: inline-block;
}

.chart-container {
    position: relative;
    height: 400px;
    margin: 30px 0;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* ========================================
       Phase 2-1: Time Blackhole Effect
       ======================================== */

/* Blackhole container */
.time-blackhole-container {
    position: relative;
    overflow: visible;
}

/* Blackhole effect layer */
.blackhole-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    pointer-events: none;
    opacity: 0.6; /* Increased from 0.15 to 0.6 for better visibility */
    z-index: 0;
}

/* Blackhole rings */
.blackhole-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 3px solid #667eea; /* Increased from 2px to 3px */
    border-radius: 50%;
    animation: blackhole-pulse 3s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.6), inset 0 0 20px rgba(102, 126, 234, 0.3); /* Add glow effect */
}

    .blackhole-ring.ring-1 {
        width: 80px;
        height: 80px;
        animation-delay: 0s;
    }

    .blackhole-ring.ring-2 {
        width: 120px;
        height: 120px;
        animation-delay: 1s;
    }

    .blackhole-ring.ring-3 {
        width: 160px;
        height: 160px;
        animation-delay: 2s;
    }

/* Blackhole center */
.blackhole-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px; /* Increased from 40px to 60px */
    height: 60px; /* Increased from 40px to 60px */
    background: radial-gradient(circle, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: blackhole-rotate 4s linear infinite;
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.8), 0 0 60px rgba(118, 75, 162, 0.6), inset 0 0 20px rgba(0, 0, 0, 0.5); /* Enhanced glow effect */
}

    .blackhole-center i {
        color: white;
        font-size: 24px; /* Increased from 18px to 24px */
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8)); /* Add glow to icon */
    }

/* Blackhole pulse animation - REVERSED: from outside to inside (sucking in) */
@keyframes blackhole-pulse {
    0% {
        transform: translate(-50%, -50%) scale(1.8);
        opacity: 0.9;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.6;
    }

    100% {
        transform: translate(-50%, -50%) scale(0.3);
        opacity: 0;
    }
}

/* Blackhole rotation animation */
@keyframes blackhole-rotate {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Shake effect when value changes */
.time-blackhole-container.shake {
    animation: blackhole-shake 0.5s ease-in-out;
}

@keyframes blackhole-shake {
    0%, 100% {
        transform: translateX(0);
    }

    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }

    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* ========================================
       Phase 2-2: Youth Countdown Timer
       ======================================== */

/* Countdown card */
.youth-countdown-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 30px;
    margin-top: 20px;
}

    .youth-countdown-card .card-title {
        color: white;
        margin-bottom: 15px;
    }

.countdown-message {
    font-size: 1.1rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

    .countdown-message span {
        font-weight: 700;
        font-size: 1.3rem;
    }

/* Countdown grid */
.countdown-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin: 25px 0;
}

.countdown-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 15px 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.countdown-value {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 5px;
    font-family: 'Courier New', monospace;
    animation: countdown-pulse 1s ease-in-out infinite;
}

.countdown-label {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Countdown pulse animation */
@keyframes countdown-pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Warning message */
.countdown-warning {
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid rgba(239, 68, 68, 0.5);
    border-radius: 12px;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    animation: warning-blink 2s ease-in-out infinite;
}

@keyframes warning-blink {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.countdown-warning span {
    color: #fbbf24;
    font-weight: 700;
}

/* Section titles within countdown */
.countdown-section-title {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 30px 0 15px 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

    .countdown-section-title i {
        margin-right: 8px;
    }

    .countdown-section-title.future-waste {
        background: rgba(239, 68, 68, 0.15);
        border: 1px solid rgba(239, 68, 68, 0.3);
        animation: pulse-glow 2s ease-in-out infinite;
    }

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
    }
}

/* Danger highlight warning */
.countdown-warning.danger-highlight {
    background: rgba(220, 38, 38, 0.25);
    border-color: rgba(220, 38, 38, 0.6);
    font-size: 1.3rem;
    margin: 15px 0;
    animation: danger-pulse 1.5s ease-in-out infinite;
}

@keyframes danger-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.02);
        opacity: 0.9;
    }
}

/* Future grid styling */
.countdown-grid.future-grid {
    margin-top: 15px;
}

    .countdown-grid.future-grid .countdown-item.danger .countdown-value {
        color: #fca5a5;
        text-shadow: 0 0 15px rgba(220, 38, 38, 0.6);
        font-weight: 900;
    }

    .countdown-grid.future-grid .countdown-item.danger {
        background: rgba(239, 68, 68, 0.1);
        border: 2px solid rgba(239, 68, 68, 0.3);
    }

/* ========== Phase 2-3: Opportunity Showcase Styles ========== */
.opportunity-showcase {
    margin-top: 30px;
}

.opportunity-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.opportunity-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px;
    padding: 25px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .opportunity-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
        border-color: #667eea;
    }

/* Icon */
.opportunity-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 24px;
    animation: icon-float 3s ease-in-out infinite;
}

@keyframes icon-float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.books-item .opportunity-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    color: white;
}

.skills-item .opportunity-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.marathon-item .opportunity-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.family-item .opportunity-icon {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    color: white;
}

/* Content */
.opportunity-content {
    text-align: center;
}

.opportunity-value {
    font-size: 3rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.opportunity-label {
    font-size: 1.1rem;
    color: #718096;
    font-weight: 600;
    margin-bottom: 15px;
}

/* Visual area */
.opportunity-visual {
    height: 80px;
    margin: 20px 0;
    position: relative;
}

/* Book stack */
.book-stack {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 100%;
    gap: 4px;
}

    .book-stack .book {
        width: 30px;
        background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
        border-radius: 2px 2px 0 0;
        animation: book-stack-grow 0.5s ease-out forwards;
        transform-origin: bottom;
        opacity: 0;
    }

@keyframes book-stack-grow {
    from {
        height: 0;
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Skill badges */
.skill-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    height: 100%;
    align-items: center;
}

    .skill-badges .skill-badge {
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
        color: white;
        padding: 6px 12px;
        border-radius: 20px;
        font-size: 0.75rem;
        font-weight: 600;
        animation: badge-pop 0.3s ease-out forwards;
        opacity: 0;
        transform: scale(0);
    }

@keyframes badge-pop {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Marathon track */
.marathon-track {
    height: 100%;
    background: linear-gradient(90deg, #e2e8f0 0%, #e2e8f0 50%, #10b981 50%, #10b981 100%);
    background-size: 40px 100%;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

    .marathon-track::after {
        content: '🏃';
        position: absolute;
        top: 50%;
        transform: translateY(-50%) scaleX(-1); /* Mirror flip to face right */
        font-size: 24px;
        animation: runner-move 2s linear infinite;
    }

@keyframes runner-move {
    0% {
        left: -30px;
    }

    100% {
        left: 100%;
    }
}

/* Family moments */
.family-moments {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    gap: 10px;
    font-size: 32px;
}

    .family-moments .heart {
        animation: heart-beat 1s ease-in-out infinite;
        opacity: 0;
    }

@keyframes heart-beat {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Example text */
.opportunity-example {
    font-size: 0.85rem;
    color: #a0aec0;
    font-style: italic;
    margin-top: 10px;
}

/* ========== Phase 2-4: Enhanced Addiction Badge System ========== */
.addiction-showcase {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

    .addiction-showcase .card-title {
        color: white;
    }

/* Large badge */
.addiction-badge-large {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 30px auto;
}

.badge-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    animation: badge-glow-pulse 2s ease-in-out infinite;
}

/* Glow colors by level */
.addiction-badge-large[data-level="normal"] .badge-glow {
    background: radial-gradient(circle, rgba(34, 197, 94, 0.4) 0%, transparent 70%);
}

.addiction-badge-large[data-level="mild"] .badge-glow {
    background: radial-gradient(circle, rgba(251, 191, 36, 0.4) 0%, transparent 70%);
}

.addiction-badge-large[data-level="moderate"] .badge-glow {
    background: radial-gradient(circle, rgba(249, 115, 22, 0.4) 0%, transparent 70%);
}

.addiction-badge-large[data-level="severe"] .badge-glow {
    background: radial-gradient(circle, rgba(239, 68, 68, 0.4) 0%, transparent 70%);
}

.addiction-badge-large[data-level="extreme"] .badge-glow {
    background: radial-gradient(circle, rgba(220, 38, 38, 0.6) 0%, transparent 70%);
    animation: badge-glow-danger 1s ease-in-out infinite;
}

@keyframes badge-glow-pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.8;
    }
}

@keyframes badge-glow-danger {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
}

/* Badge content */
.badge-content {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 20px auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.badge-emoji {
    font-size: 64px;
    margin-bottom: 10px;
    animation: emoji-bounce 1s ease-in-out infinite;
}

@keyframes emoji-bounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-5px) scale(1.1);
    }
}

.badge-level {
    font-size: 1.3rem;
    font-weight: 700;
}

/* Addiction meter */
.addiction-meter {
    margin: 30px 0;
}

.meter-bar {
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.meter-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e 0%, #eab308 25%, #f97316 50%, #ef4444 75%, #dc2626 100%);
    border-radius: 15px;
    transition: width 1s ease-out;
    position: relative;
}

    .meter-fill::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        animation: meter-shine 2s ease-in-out infinite;
    }

@keyframes meter-shine {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.meter-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 1.5rem;
}

/* Description */
.addiction-showcase .addiction-description {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    font-size: 1.1rem;
    line-height: 1.6;
    color: white; /* Fix: ensure text is visible on dark background */
}

/* Comparison chart */
.level-comparison {
    margin-top: 30px;
}

.comparison-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.comparison-chart {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.comparison-bar {
    display: flex;
    align-items: center;
    gap: 15px;
}

.bar-label {
    min-width: 100px;
    text-align: right;
    font-weight: 600;
}

.bar-fill {
    flex: 1;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    font-weight: 700;
    position: relative;
    overflow: hidden;
}

.average-bar {
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    width: 57%; /* 5.7 / 10 = 57% */
}

.your-bar {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
    transition: width 1s ease-out;
}

/* ========== Phase 3: Enhanced Share Image Styles ========== */
/* Share image container (fixed size: 1200x630 for social media) */
.share-image-container {
    width: 1200px;
    height: 630px;
    background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 100%);
    color: white;
    padding: 40px 60px;
    font-family: 'Arial', 'Microsoft JhengHei', sans-serif;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Share image header with badge */
.share-header {
    text-align: center;
    margin-bottom: 25px;
}

.share-logo {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
    opacity: 0.95;
}

.share-badge-level {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px 30px;
    display: inline-block;
}

.share-badge-emoji {
    font-size: 60px;
    margin-bottom: 10px;
}

.share-badge-text {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
}

.share-daily-hours {
    font-size: 20px;
    font-weight: 600;
    opacity: 0.9;
    margin-top: 5px;
}

.share-daily-hours span {
    font-size: 24px;
    font-weight: 800;
    color: #fbbf24;
}

/* Section titles */
.share-section-title {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 15px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.share-section-title.danger {
    background: rgba(220, 38, 38, 0.25);
    border: 1px solid rgba(220, 38, 38, 0.5);
}

/* Wasted time section */
.share-wasted-section {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.share-wasted-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 12px;
}

.share-wasted-item {
    text-align: center;
}

.share-wasted-value {
    font-size: 48px;
    font-weight: 900;
    line-height: 1;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

.share-wasted-label {
    font-size: 18px;
    font-weight: 600;
    opacity: 0.85;
    margin-top: 5px;
}

.share-life-percentage {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    margin-top: 10px;
    opacity: 0.9;
}

.share-life-percentage span {
    font-size: 26px;
    font-weight: 800;
    color: #fca5a5;
}

/* Future section */
.share-future-section {
    background: rgba(220, 38, 38, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(220, 38, 38, 0.4);
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 20px;
    text-align: center;
}

.share-future-warning {
    font-size: 24px;
    font-weight: 700;
    margin: 10px 0;
}

.share-future-warning span {
    font-size: 32px;
    font-weight: 900;
    color: #fca5a5;
    text-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

.share-future-percentage {
    font-size: 20px;
    font-weight: 600;
    margin-top: 8px;
}

.share-future-percentage span {
    font-size: 28px;
    font-weight: 900;
    color: #fef08a;
}

/* Opportunities section */
.share-opportunities-section {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 20px;
}

.share-opportunities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.share-opportunity-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px 10px;
}

.share-opportunity-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.share-opportunity-value {
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
    margin: 8px 0;
}

.share-opportunity-label {
    font-size: 16px;
    font-weight: 600;
    opacity: 0.85;
}

/* Share footer */
.share-footer {
    text-align: center;
    padding-top: 15px;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
}

.share-cta {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.share-url {
    font-size: 20px;
    font-weight: 600;
    opacity: 0.75;
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }

    .input-row {
        grid-template-columns: 1fr;
    }

    .chart-container {
        height: 300px;
    }
    /* Phase 2-2: Countdown responsive */
    .countdown-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .countdown-value {
        font-size: 1.5rem;
    }
    /* Phase 2-3: Opportunity responsive */
    .opportunity-grid {
        grid-template-columns: 1fr;
    }

    .opportunity-value {
        font-size: 2.5rem;
    }
}

.seo-content {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #e2e8f0;
}

    .seo-content h2 {
        color: #2d3748;
        margin-bottom: 20px;
        font-weight: 700;
    }

    .seo-content h3 {
        color: #4a5568;
        margin-top: 30px;
        margin-bottom: 15px;
        font-weight: 600;
    }

    .seo-content p, .seo-content li {
        color: #718096;
        line-height: 1.8;
        margin-bottom: 15px;
    }

    .seo-content ul {
        padding-left: 30px;
    }

.faq-item {
    margin-bottom: 25px;
}

.faq-question {
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
}

.faq-answer {
    color: #718096;
    line-height: 1.8;
    padding-left: 20px;
}

/* ========================================
       Phase 2-3 & 3-1 Integrated: Life Opportunities Showcase
       ======================================== */

/* 整合機會成本展示區 */
.life-opportunities-showcase {
    margin-top: 30px;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    padding: 40px;
}

    .life-opportunities-showcase .card-title {
        color: white;
        text-align: center;
        font-size: 2rem;
        margin-bottom: 20px;
    }

.opportunities-subtitle {
    text-align: center;
    font-size: 1.1rem;
    opacity: 0.85;
    margin-bottom: 30px;
}

.opportunities-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

/* Unified opportunity item (works for both Phase 2-3 and Phase 3-1 items) */
.opportunity-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .opportunity-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: left 0.5s ease;
    }

    .opportunity-item:hover::before {
        left: 100%;
    }

    .opportunity-item:hover {
        transform: translateY(-5px);
        border-color: rgba(255, 255, 255, 0.5);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }

/* Icon styles (unified for both types) */
.opportunity-icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    animation: icon-pulse 2s ease-in-out infinite;
}

@keyframes icon-pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Value display (unified) */
.opportunity-value {
    font-size: 3rem;
    font-weight: 900;
    color: #fbbf24;
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
}

/* Label styles (unified) */
.opportunity-label {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #ffffff;
    opacity: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Visual elements (from Phase 2-3) */
.opportunity-visual {
    height: 60px;
    margin: 15px 0;
}

/* Detail text (from Phase 3-1) */
.opportunity-detail {
    font-size: 0.9rem;
    color: #e5e7eb;
    opacity: 1;
    font-style: italic;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding-top: 10px;
    margin-top: 10px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Example text (from Phase 2-3) */
.opportunity-example {
    font-size: 0.9rem;
    color: #e5e7eb;
    opacity: 1;
    font-style: italic;
    margin-top: 10px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.opportunities-note {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid rgba(239, 68, 68, 0.5);
    border-radius: 12px;
    padding: 20px;
    animation: note-blink 2s ease-in-out infinite;
}

@keyframes note-blink {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .opportunities-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .opportunities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .opportunities-grid {
        grid-template-columns: 1fr;
    }

    .opportunity-value {
        font-size: 2.5rem;
    }
}

/* ========================================
       Phase 3-2: Life Time Distribution Pie Chart
       ======================================== */

/* 人生餅圖卡片 */
.life-pie-chart-card {
    margin-top: 30px;
}

.life-pie-description {
    text-align: center;
    font-size: 1.1rem;
    color: #718096;
    margin-bottom: 20px;
    font-style: italic;
}

.chart-container {
    position: relative;
    height: 400px;
    margin-bottom: 20px;
}

.life-pie-insights {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 30px;
}

.insight-item {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

    .insight-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    }

    .insight-item.highlight {
        background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
        border-color: #ef4444;
        animation: pulse-border 2s ease-in-out infinite;
    }

@keyframes pulse-border {
    0%, 100% {
        border-color: #ef4444;
        box-shadow: 0 0 0 rgba(239, 68, 68, 0);
    }

    50% {
        border-color: #dc2626;
        box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
    }
}

.insight-item i {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
    color: #667eea;
}

.insight-item.highlight i {
    color: #ef4444;
}

.insight-item span:first-of-type {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    display: block;
    margin-bottom: 5px;
}

.insight-item.highlight span:first-of-type {
    color: #ef4444;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.insight-item span:last-of-type {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
}

/* 響應式 */
@media (max-width: 768px) {
    .life-pie-insights {
        grid-template-columns: repeat(2, 1fr);
    }

    .chart-container {
        height: 300px;
    }
}

@media (max-width: 576px) {
    .life-pie-insights {
        grid-template-columns: 1fr;
    }
}

/* ========================================
       Phase 3-3: 7-Day Detox Challenge
       ======================================== */

/* 7天挑戰卡片 */
.detox-challenge-card {
    margin-top: 30px;
}

.challenge-intro {
    text-align: center;
    font-size: 1.1rem;
    color: #4b5563;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    line-height: 1.6;
}

    .challenge-intro strong {
        color: #dc2626;
        font-size: 1.3rem;
        font-weight: 700;
    }

.challenge-timeline {
    position: relative;
    padding-left: 40px;
    margin-bottom: 30px;
}

    .challenge-timeline::before {
        content: '';
        position: absolute;
        left: 15px;
        top: 0;
        bottom: 0;
        width: 3px;
        background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    }

.challenge-day {
    position: relative;
    margin-bottom: 30px;
    padding-left: 20px;
}

    .challenge-day::before {
        content: '';
        position: absolute;
        left: -28px;
        top: 10px;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: white;
        border: 3px solid #667eea;
        z-index: 1;
        transition: all 0.3s ease;
    }

    .challenge-day.completed::before {
        background: #10b981;
        border-color: #10b981;
        box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    }

.day-number {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

    .day-number span {
        font-size: 1.5rem;
        font-weight: 700;
        color: #667eea;
    }

.day-checkbox {
    position: relative;
}

    .day-checkbox input[type="checkbox"] {
        width: 24px;
        height: 24px;
        cursor: pointer;
        accent-color: #10b981;
    }

.day-content {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.challenge-day.completed .day-content {
    border-color: #10b981;
    background: linear-gradient(135deg, #d1fae5 0%, #f0fdf4 100%);
}

.day-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 15px;
}

.day-tasks {
    margin: 20px 0;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin-bottom: 8px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

    .task-item:hover {
        border-color: #667eea;
        transform: translateX(5px);
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
    }

    .task-item i {
        color: #10b981;
        flex-shrink: 0;
    }

.day-goal {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-radius: 8px;
    font-weight: 600;
    color: #1e40af;
}

    .day-goal i {
        color: #dc2626;
        font-size: 1.2rem;
    }

    .day-goal span {
        color: #dc2626;
        font-size: 1.1rem;
    }

/* 進度條 */
.challenge-progress {
    margin: 30px 0;
}

.progress-bar {
    height: 30px;
    background: #e2e8f0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    position: relative;
}

    .progress-fill::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
        animation: progress-shimmer 2s infinite;
    }

@keyframes progress-shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.progress-text {
    text-align: center;
    font-size: 1.1rem;
    color: #4b5563;
}

    .progress-text span {
        font-weight: 600;
    }

.challenge-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 響應式 */
@media (max-width: 768px) {
    .challenge-timeline {
        padding-left: 30px;
    }

    .day-number span {
        font-size: 1.2rem;
    }

    .day-title {
        font-size: 1.1rem;
    }

    .task-item {
        font-size: 0.9rem;
    }
}

/* ========================================
   Phase 3-4: Alternative Activities Recommendation Engine
   ======================================== */

/* 替代活動推薦卡片 */
.alternative-activities-card {
    margin-top: 30px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.activities-intro {
    text-align: center;
    font-size: 1.2rem;
    color: #166534;
    margin-bottom: 30px;
}

.activities-intro strong {
    color: #dc2626;
    font-size: 1.5rem;
}

.activities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.activity-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    border: 2px solid #bbf7d0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.activity-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.2);
    border-color: #10b981;
}

.activity-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
}

.activity-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
}

.activity-time {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 15px;
}

.activity-benefit {
    font-size: 0.9rem;
    color: #10b981;
    font-style: italic;
}

.activities-cta {
    text-align: center;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Phase 3-5: Future Prediction (10 Years)
   ======================================== */

/* 未來預測卡片 */
.future-prediction-card {
    margin-top: 30px;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    color: white;
    padding: 40px;
}

.future-prediction-card .card-title {
    color: white;
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 30px;
}

.prediction-warning {
    text-align: center;
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid rgba(239, 68, 68, 0.5);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 40px;
    font-size: 1.2rem;
    animation: warning-pulse 2s ease-in-out infinite;
}

@keyframes warning-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.prediction-warning strong {
    color: #fbbf24;
    font-size: 1.5rem;
}

.prediction-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.prediction-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
}

.prediction-item.danger {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

.prediction-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.prediction-value {
    font-size: 2.5rem;
    font-weight: 900;
    color: #fbbf24;
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
}

.prediction-item.danger .prediction-value {
    color: #ef4444;
}

.prediction-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* 對比區域 */
.comparison-section {
    margin: 40px 0;
}

.comparison-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: #fbbf24;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
}

.comparison-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.comparison-card .card-header {
    padding: 20px;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
}

.comparison-card .card-header.danger {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
}

.comparison-card .card-header.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.comparison-card .card-body {
    padding: 25px;
}

.stat-item {
    padding: 12px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 1.1rem;
}

.comparison-arrow {
    text-align: center;
    font-size: 3rem;
    color: #fbbf24;
}

.comparison-arrow span {
    display: block;
    font-size: 1rem;
    margin-top: 10px;
}

.prediction-cta {
    margin-top: 40px;
}

.btn-lg {
    font-size: 1.5rem;
    padding: 20px;
}

/* 響應式 - Phase 3-4 & 3-5 */
@media (max-width: 992px) {
    .activities-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .prediction-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .comparison-grid {
        grid-template-columns: 1fr;
    }

    .comparison-arrow {
        transform: rotate(90deg);
        margin: 20px 0;
    }
}

@media (max-width: 576px) {
    .activities-grid {
        grid-template-columns: 1fr;
    }

    .prediction-stats {
        grid-template-columns: 1fr;
    }

    .future-prediction-card .card-title {
        font-size: 1.8rem;
    }

    .prediction-warning {
        font-size: 1rem;
        padding: 20px;
    }

    .prediction-value {
        font-size: 2rem;
    }

    .btn-lg {
        font-size: 1.2rem;
        padding: 15px;
    }
}
