/* 
   TLB Management Class - Sprint Style Redesign 
   Reference: https://sprint.codeit.kr/
*/

:root {
    /* Color Palette - Sprint Style */
    --sp-bg-main: #0a0a0a;
    --sp-bg-card: #141414;
    --sp-bg-card-hover: #1c1c1c;

    --sp-text-white: #ffffff;
    --sp-text-gray: #a0a0a0;
    --sp-text-dark: #666666;

    --sp-primary: #7000ff;
    --sp-accent: #ff00aa;
    --sp-gradient-main: linear-gradient(135deg, #7000ff 0%, #ff00aa 100%);
    --sp-gradient-text: linear-gradient(92deg, #fff 0%, #b0b0b0 100%);

    /* Spacing */
    --sp-container-width: 1000px;
    /* 좀 더 타이트한 몰입감 */

    /* Effects */
    --sp-glass: rgba(255, 255, 255, 0.03);
    --sp-glass-border: rgba(255, 255, 255, 0.1);
    --sp-shadow-glow: 0 0 40px rgba(112, 0, 255, 0.15);
}

/* Reset & Base */
/* Body style removed to prevent global conflict */
/* body {
    background-color: var(--sp-bg-main);
    color: var(--sp-text-white);
    font-family: 'SUIT', sans-serif;
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
} */

.sp-container {
    max-width: var(--sp-container-width);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
}

/* Typography */
.sp-h1 {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0;
}

.sp-h2 {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
}

.sp-h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.sp-desc {
    font-size: 18px;
    color: var(--sp-text-gray);
    font-weight: 400;
}

.sp-gradient-text {
    background: var(--sp-gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Components */

/* 1. Hero Section */
.sp-hero {
    padding: 160px 0 120px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.sp-hero::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(112, 0, 255, 0.15) 0%, transparent 70%);
    filter: blur(60px);
    z-index: -1;
}

.sp-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: rgba(112, 0, 255, 0.1);
    border: 1px solid rgba(112, 0, 255, 0.3);
    border-radius: 100px;
    color: #b355ff;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 32px;
    box-shadow: 0 0 20px rgba(112, 0, 255, 0.1);
}

.sp-hero-btn {
    display: inline-block;
    padding: 20px 48px;
    background: var(--sp-gradient-main);
    color: white;
    font-weight: 700;
    font-size: 18px;
    border-radius: 12px;
    text-decoration: none;
    margin-top: 48px;
    transition: transform 0.2s;
    box-shadow: 0 10px 30px rgba(112, 0, 255, 0.3);
}

.sp-hero-btn:hover {
    transform: translateY(-2px);
}

/* 2. Section Common */
.sp-section {
    padding: 120px 0;
}

.sp-section-header {
    margin-bottom: 64px;
    text-align: center;
}

.sp-label {
    color: var(--sp-primary);
    font-weight: 900;
    /* 요청: 800~900 */
    font-size: 13px;
    letter-spacing: 0.2em;
    /* 요청: 자간 확대 */
    text-transform: uppercase;
    display: block;
    margin-bottom: 16px;
}

/* 3. Cards */
.sp-card {
    background: var(--sp-glass);
    border: 1px solid var(--sp-glass-border);
    border-radius: 24px;
    padding: 40px;
    transition: all 0.3s ease;
}

.sp-card:hover {
    background: var(--sp-bg-card-hover);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.sp-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

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

.sp-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* 4. Feature List (Checkmarks) */
.sp-check-list {
    list-style: none;
    padding: 0;
    margin: 24px 0 0;
}

.sp-check-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 16px;
    color: var(--sp-text-gray);
    font-size: 16px;
}

.sp-check-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--sp-accent);
    font-weight: bold;
}

/* Chat Bubble Section - Advanced */
.sp-chat-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
    /* 간격 증가 */
}

.sp-chat-bubble {
    background: white;
    color: #333;
    padding: 24px 32px;
    border-radius: 24px;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.5;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform-origin: center bottom;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    opacity: 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* 말풍선 꼬리 공통 */
.sp-chat-bubble::after {
    content: '';
    position: absolute;
    bottom: -12px;
    width: 24px;
    height: 24px;
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    transform: rotate(45deg);
}

/* 홀수: 좌하단 꼬리 */
.sp-chat-bubble:nth-child(odd) {
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.sp-chat-bubble:nth-child(odd)::after {
    left: 24px;
    /* 모서리에서 살짝 띄움 */
}

/* 짝수: 우하단 꼬리 */
.sp-chat-bubble:nth-child(even) {
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    background: #f4f0ff;
    /* 짝수는 살짝 다른 색상 */
}

.sp-chat-bubble:nth-child(even)::after {
    right: 24px;
    background: #f4f0ff;
}

.sp-chat-bubble:nth-child(1) {
    animation-delay: 0.1s;
}

.sp-chat-bubble:nth-child(2) {
    animation-delay: 0.2s;
}

.sp-chat-bubble:nth-child(3) {
    animation-delay: 0.3s;
}

.sp-chat-bubble:nth-child(4) {
    animation-delay: 0.4s;
}

.sp-chat-bubble strong {
    color: var(--sp-primary);
    font-weight: 800;
    background: linear-gradient(120deg, rgba(112, 0, 255, 0.1) 0%, rgba(112, 0, 255, 0) 100%);
    padding: 0 4px;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Character Image Placeholder */
.sp-chat-character {
    text-align: center;
    margin-bottom: 40px;
}

.sp-chat-character img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #333;
    object-fit: cover;
    border: 4px solid var(--sp-primary);
    box-shadow: 0 0 30px rgba(112, 0, 255, 0.3);
}

/* Section Backgrounds - Enhanced */
section.sp-bg-black,
.sp-bg-black {
    background-color: #0a0a0a !important;
    background: #0a0a0a !important;
    color: white !important;
}

section.sp-bg-dark,
.sp-bg-dark {
    background-color: #141414 !important;
    background: #141414 !important;
    color: white !important;
}

/* Tinted White / Gradient Backgrounds */
section.sp-bg-white,
.sp-bg-white {
    background-color: #f8f9fa !important;
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%) !important;
    color: #1f2124 !important;
}

section.sp-bg-gray,
.sp-bg-gray {
    background-color: #1a1a1a !important;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
    color: white !important;
    position: relative;
    overflow: hidden;
}

.sp-bg-gray::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(112, 0, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

/* Light Mode Text Overrides - Only for sp-bg-white */
.sp-bg-white .sp-h2 {
    color: #1f2124;
}

.sp-bg-white .sp-desc {
    color: #666;
}

.sp-bg-white .sp-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    backdrop-filter: blur(10px);
}

/* Horizontal Course Layout */
.sp-course-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sp-course-row {
    display: grid;
    grid-template-columns: 300px 1fr auto;
    gap: 32px;
    align-items: center;
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 24px;
    padding: 32px;
    transition: all 0.3s ease;
}

.sp-course-row:hover {
    border-color: var(--sp-primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.sp-course-info h3 {
    font-size: 24px;
    margin: 0 0 8px 0;
    color: white;
}

.sp-course-desc {
    color: #888;
    font-size: 15px;
    margin: 0;
}

.sp-course-meta {
    display: flex;
    gap: 24px;
    color: #aaa;
    font-size: 14px;
}

.sp-course-action .sp-btn {
    padding: 12px 24px;
    background: var(--sp-primary);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    display: inline-block;
}

/* Coming Soon Overlay */
.sp-course-row.disabled {
    opacity: 0.5;
    position: relative;
    pointer-events: none;
    border-style: dashed;
}

.sp-course-row.disabled::after {
    content: 'COMING SOON';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 12px 24px;
    border-radius: 100px;
    font-weight: 700;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 5. Course Card (Special) */
.sp-course-card {
    background: #141414;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid #2a2a2a;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sp-course-card.highlight {
    border: 1px solid var(--sp-primary);
    box-shadow: 0 0 30px rgba(112, 0, 255, 0.1);
}

.sp-course-header {
    padding: 32px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
    border-bottom: 1px solid #2a2a2a;
}

.sp-course-body {
    padding: 32px;
    flex: 1;
}

.sp-price {
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin-top: 8px;
}

.sp-price span {
    font-size: 16px;
    color: #666;
    font-weight: 400;
}

/* 6. Reward Box */
.sp-reward-box {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border: 1px solid #333;
    border-radius: 32px;
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.sp-reward-content {
    flex: 1;
}

.sp-reward-badge {
    background: var(--sp-gradient-main);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    box-shadow: 0 10px 30px rgba(112, 0, 255, 0.4);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sp-h1 {
        font-size: 36px;
    }

    .sp-h2 {
        font-size: 28px;
    }

    .sp-grid-2,
    .sp-grid-3,
    .sp-grid-4 {
        grid-template-columns: 1fr;
    }

    .sp-reward-box {
        flex-direction: column;
        text-align: center;
        padding: 40px 24px;
    }

    .sp-hero {
        padding: 100px 0 80px;
    }
}

/* Recommendation Section - ZigZag Layout */
.sp-recommend-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.sp-recommend-card {
    display: flex;
    align-items: center;
    gap: 40px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    padding: 40px;
    transition: transform 0.3s ease;
}

.sp-recommend-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--sp-primary);
}

/* 짝수 번째 카드는 좌우 반전 (ZigZag) */
.sp-recommend-card:nth-child(even) {
    flex-direction: row-reverse;
}

.sp-recommend-img {
    flex: 0 0 30%;
    /* 30% 너비 */
    aspect-ratio: 1;
    /* 1:1 비율 */
    border-radius: 24px;
    overflow: hidden;
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.sp-recommend-content {
    flex: 1;
    /* 나머지 70% */
    text-align: left;
}

.sp-recommend-title {
    font-family: 'SUITE', sans-serif;
    /* 요청: SUITE 폰트 */
    font-size: 32px;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
}

.sp-recommend-quote {
    font-family: 'SUIT', sans-serif;
    font-size: 24px;
    font-weight: 800;
    /* 요청: 두껍게 */
    color: var(--sp-primary);
    margin-bottom: 20px;
    line-height: 1.3;
}

.sp-recommend-desc {
    font-size: 16px;
    color: #aaa;
    line-height: 1.7;
    white-space: pre-line;
    /* 줄바꿈 허용 */
}

/* Mobile Responsive for Recommendation */
@media (max-width: 768px) {

    .sp-recommend-card,
    .sp-recommend-card:nth-child(even) {
        flex-direction: column;
        text-align: center;
        gap: 24px;
        padding: 24px;
    }

    .sp-recommend-img {
        width: 120px;
        height: 120px;
        flex: none;
    }

    .sp-recommend-content {
        text-align: center;
    }
}

/* Floating Bubble Layout (Reference Implementation) */
.sp-floating-container {
    position: relative;
    height: 600px;
    /* 충분한 높이 확보 */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
}

.sp-floating-center {
    width: 300px;
    height: 300px;
    z-index: 2;
    position: relative;
    animation: floatCenter 6s ease-in-out infinite;
}

.sp-floating-bubble {
    position: absolute;
    background: white;
    border: 1px solid rgba(112, 0, 255, 0.1);
    border-radius: 50%;
    /* 원형에 가깝게 */
    width: 240px;
    height: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(112, 0, 255, 0.1);
    z-index: 1;
    transition: transform 0.3s ease;
}

.sp-floating-bubble:hover {
    transform: scale(1.05);
    border-color: var(--sp-primary);
    z-index: 3;
}

.sp-bubble-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 12px;
    position: relative;
}

.sp-bubble-badge {
    position: absolute;
    bottom: 0;
    right: -5px;
    width: 28px;
    height: 28px;
    background: #ff4d4d;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sp-bubble-text {
    font-size: 16px;
    color: #333;
    font-weight: 700;
    line-height: 1.4;
    word-break: keep-all;
}

/* Positions */
.sp-bubble-1 {
    top: 0;
    left: 5%;
    animation: float 5s ease-in-out infinite;
}

.sp-bubble-2 {
    top: 0;
    right: 5%;
    animation: float 5s ease-in-out infinite 1s;
}

.sp-bubble-3 {
    bottom: 20px;
    left: 10%;
    animation: float 5s ease-in-out infinite 2s;
}

.sp-bubble-4 {
    bottom: 20px;
    right: 10%;
    animation: float 5s ease-in-out infinite 3s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes floatCenter {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(2deg);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sp-floating-container {
        height: auto;
        flex-direction: column;
        gap: 24px;
        margin-top: 0;
    }

    .sp-floating-center {
        width: 200px;
        height: 200px;
        order: 1;
    }

    .sp-floating-bubble {
        position: relative;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        width: 100%;
        height: auto;
        border-radius: 24px;
        flex-direction: row;
        text-align: left;
        gap: 20px;
        order: 2;
    }

    .sp-bubble-icon {
        margin-bottom: 0;
    }
}