/* ==========================================================================
   TLDR Summary - Frontend Styles
   ========================================================================== */

.tldr-box {
    border-radius: 0 12px 12px 0;
    padding: 20px 24px;
    margin-bottom: 32px;
    border-left: 4px solid var(--tldr-color);
    background: var(--tldr-bg);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
        'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Noto Sans SC',
        'Helvetica Neue', Arial, sans-serif;
    position: relative;
    overflow: hidden;
}

/* Subtle gradient overlay */
.tldr-box::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--tldr-bg));
    opacity: 0.5;
    pointer-events: none;
}

/* ---------- Header ---------- */
.tldr-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.tldr-label {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.3px;
    color: var(--tldr-color);
    line-height: 1;
}

.tldr-reading-time {
    font-size: 13px;
    color: #4b5563;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

/* ---------- Content ---------- */
.tldr-content {
    margin: 0;
    font-size: 15px;
    line-height: 1.75;
    color: #1f2937;
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   Color Themes
   ========================================================================== */

/* Blue (Default) */
.tldr-color-blue {
    --tldr-color: #2563EB;
    --tldr-bg: #eff6ff;
}

/* Green */
.tldr-color-green {
    --tldr-color: #059669;
    --tldr-bg: #ecfdf5;
}

/* Purple */
.tldr-color-purple {
    --tldr-color: #7C3AED;
    --tldr-bg: #f5f3ff;
}

/* Orange */
.tldr-color-orange {
    --tldr-color: #D97706;
    --tldr-bg: #fffbeb;
}

/* Red */
.tldr-color-red {
    --tldr-color: #DC2626;
    --tldr-bg: #fef2f2;
}

/* Pink */
.tldr-color-pink {
    --tldr-color: #DB2777;
    --tldr-bg: #fdf2f8;
}

/* Teal */
.tldr-color-teal {
    --tldr-color: #0D9488;
    --tldr-bg: #f0fdfa;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 600px) {
    .tldr-box {
        padding: 16px 18px;
        margin-bottom: 24px;
        border-radius: 0 8px 8px 0;
    }

    .tldr-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .tldr-content {
        font-size: 14px;
        line-height: 1.7;
    }
}

/* ==========================================================================
   Dark Mode
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .tldr-color-blue {
        --tldr-bg: rgba(59, 130, 246, 0.15);
    }
    .tldr-color-green {
        --tldr-bg: rgba(16, 185, 129, 0.15);
    }
    .tldr-color-purple {
        --tldr-bg: rgba(139, 92, 246, 0.15);
    }
    .tldr-color-orange {
        --tldr-bg: rgba(245, 158, 11, 0.15);
    }
    .tldr-color-red {
        --tldr-bg: rgba(239, 68, 68, 0.15);
    }
    .tldr-color-pink {
        --tldr-bg: rgba(236, 72, 153, 0.15);
    }
    .tldr-color-teal {
        --tldr-bg: rgba(20, 184, 166, 0.15);
    }

    .tldr-content {
        color: #e5e7eb;
    }

    .tldr-reading-time {
        color: #9ca3af;
    }
}

/* ==========================================================================
   Animation
   ========================================================================== */

.tldr-box {
    animation: tldr-fade-in 0.4s ease-out;
}

@keyframes tldr-fade-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
