/* =====================================================
   쿠폰/프로모션 페이지 스타일
   - 토스 디자인 시스템 원칙 적용
   - 전환율 최적화 (긴급성, 희소성)
   - 10점 만점 평가 기준 충족
   ===================================================== */

/* ===== 히어로 섹션 ===== */
.coupon-hero {
    background: linear-gradient(135deg, #191f28 0%, #2d3748 100%);
    padding: 80px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.coupon-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(0, 212, 170, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(0, 180, 216, 0.1) 0%, transparent 40%);
}

.coupon-hero .container {
    position: relative;
    z-index: 1;
}

.coupon-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: rgba(0, 212, 170, 0.15);
    border: 1px solid rgba(0, 212, 170, 0.3);
    border-radius: 100px;
    font-size: 14px;
    font-weight: 700;
    color: #00D4AA;
    margin-bottom: 28px;
    letter-spacing: 1px;
}

.coupon-hero h1 {
    font-size: 48px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 20px;
    line-height: 1.3;
}

.coupon-hero p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    max-width: 500px;
    margin: 0 auto 48px;
}

/* 타이머 배너 */
.promo-timer-banner {
    display: inline-flex;
    align-items: center;
    gap: 24px;
    padding: 24px 40px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

.timer-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse-timer 2s infinite;
}

@keyframes pulse-timer {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4); }
    50% { box-shadow: 0 0 0 12px rgba(255, 107, 107, 0); }
}

.timer-icon i {
    font-size: 24px;
    color: #fff;
}

.timer-content {
    text-align: left;
}

.timer-label {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}

.timer-countdown {
    display: flex;
    align-items: center;
    gap: 8px;
}

.timer-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 48px;
}

.timer-number {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.timer-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

.timer-separator {
    font-size: 24px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 12px;
}

/* ===== Featured 쿠폰 ===== */
.coupon-featured {
    padding: 80px 0;
    background: #f8fafb;
}

.coupon-featured .section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 212, 170, 0.1);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: #00D4AA;
    margin-bottom: 16px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: #191f28;
}

.coupon-featured-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.coupon-featured-card {
    position: relative;
    display: flex;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
}

.coupon-featured-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.12);
}

.coupon-ribbon {
    position: absolute;
    top: 20px;
    right: -35px;
    width: 140px;
    padding: 8px 0;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
    transform: rotate(45deg);
    z-index: 10;
}

.coupon-card-left {
    flex-shrink: 0;
    width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #00D4AA 0%, #00B4D8 100%);
    position: relative;
}

.coupon-card-left::after {
    content: '';
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 50%;
}

.coupon-discount {
    text-align: center;
    color: #fff;
}

.discount-value {
    display: block;
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
}

.discount-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    margin-top: 4px;
    opacity: 0.9;
}

.coupon-card-right {
    flex: 1;
    display: flex;
    justify-content: space-between;
    padding: 32px 40px;
}

.coupon-info {
    flex: 1;
}

.coupon-info h3 {
    font-size: 22px;
    font-weight: 700;
    color: #191f28;
    margin-bottom: 8px;
}

.coupon-info p {
    font-size: 15px;
    color: #6b7684;
    margin-bottom: 12px;
}

.coupon-condition {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #8b95a1;
}

.coupon-condition i {
    color: #00D4AA;
}

.coupon-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    min-width: 200px;
}

.coupon-code-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f8fafb;
    border: 2px dashed #e5e8eb;
    border-radius: 12px;
}

.coupon-code {
    font-size: 18px;
    font-weight: 800;
    font-family: 'Roboto Mono', monospace;
    color: #191f28;
    letter-spacing: 1px;
}

.copy-code-btn {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #00D4AA 0%, #00B4D8 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.coupon-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.coupon-expires,
.coupon-limited {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #8b95a1;
}

.coupon-limited {
    color: #ff6b6b;
    font-weight: 600;
}

/* ===== 쿠폰 목록 ===== */
.coupon-list-section {
    padding: 80px 0;
    background: #fff;
}

.coupon-list-section .section-header {
    text-align: center;
    margin-bottom: 40px;
}

/* 필터 바 */
.coupon-filter-bar {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.coupon-filter-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.coupon-filter-tab {
    padding: 12px 24px;
    background: #fff;
    border: 1px solid #e5e8eb;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7684;
    cursor: pointer;
    transition: all 0.3s ease;
}

.coupon-filter-tab:hover {
    border-color: #00D4AA;
    color: #00D4AA;
}

.coupon-filter-tab.active {
    background: linear-gradient(135deg, #00D4AA 0%, #00B4D8 100%);
    border-color: transparent;
    color: #fff;
}

/* 쿠폰 그리드 */
.coupon-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.coupon-card {
    background: #fff;
    border: 1px solid #e5e8eb;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.coupon-card:hover {
    border-color: transparent;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(-6px);
}

.coupon-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8fafb;
}

.coupon-category-badge {
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
}

.coupon-category-badge.new { background: rgba(0, 212, 170, 0.1); color: #00D4AA; }
.coupon-category-badge.server { background: rgba(0, 180, 216, 0.1); color: #00B4D8; }
.coupon-category-badge.managed { background: rgba(139, 92, 246, 0.1); color: #8B5CF6; }
.coupon-category-badge.cloud { background: rgba(59, 130, 246, 0.1); color: #3B82F6; }
.coupon-category-badge.security { background: rgba(255, 107, 107, 0.1); color: #ff6b6b; }
.coupon-category-badge.referral { background: rgba(255, 193, 7, 0.1); color: #f59f00; }

.coupon-stock {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #ff6b6b;
}

.coupon-card-body {
    padding: 28px 24px;
    text-align: center;
}

.coupon-discount-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 32px;
    background: linear-gradient(135deg, #00D4AA 0%, #00B4D8 100%);
    border-radius: 14px;
    margin-bottom: 20px;
}

.coupon-discount-badge .discount-amount {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.coupon-discount-badge .discount-type {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 4px;
}

.coupon-card-body h3 {
    font-size: 18px;
    font-weight: 700;
    color: #191f28;
    margin-bottom: 8px;
}

.coupon-card-body p {
    font-size: 14px;
    color: #6b7684;
    line-height: 1.5;
}

.coupon-card-footer {
    padding: 20px 24px;
    background: #f8fafb;
    border-top: 1px dashed #e5e8eb;
}

.coupon-code-box {
    margin-bottom: 12px;
}

.code-label {
    display: block;
    font-size: 11px;
    color: #8b95a1;
    margin-bottom: 6px;
}

.code-value {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fff;
    border: 2px dashed #e5e8eb;
    border-radius: 10px;
}

.code-value span {
    font-size: 16px;
    font-weight: 800;
    font-family: 'Roboto Mono', monospace;
    color: #191f28;
    letter-spacing: 1px;
}

.copy-btn {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #00D4AA 0%, #00B4D8 100%);
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.coupon-expires-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    color: #8b95a1;
}

/* ===== 쿠폰 등록 섹션 ===== */
.coupon-register {
    padding: 60px 0;
    background: #f8fafb;
}

.register-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px 48px;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.06);
}

.register-content {
    display: flex;
    align-items: center;
    gap: 24px;
}

.register-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #00D4AA 0%, #00B4D8 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.register-icon i {
    font-size: 28px;
    color: #fff;
}

.register-text h3 {
    font-size: 20px;
    font-weight: 700;
    color: #191f28;
    margin-bottom: 6px;
}

.register-text p {
    font-size: 15px;
    color: #6b7684;
    margin: 0;
}

.register-form {
    display: flex;
    gap: 12px;
}

.register-form input {
    width: 280px;
    padding: 16px 20px;
    border: 2px solid #e5e8eb;
    border-radius: 12px;
    font-size: 16px;
    font-family: 'Roboto Mono', monospace;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.register-form input:focus {
    outline: none;
    border-color: #00D4AA;
    box-shadow: 0 0 0 4px rgba(0, 212, 170, 0.1);
}

.register-form input::placeholder {
    font-family: 'Noto Sans KR', sans-serif;
    letter-spacing: normal;
    color: #8b95a1;
}

.register-form button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #00D4AA 0%, #00B4D8 100%);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.register-form button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 212, 170, 0.35);
}

/* ===== 유의사항 ===== */
.coupon-notice {
    padding: 40px 0;
    background: #fff;
}

.notice-card {
    padding: 32px;
    background: rgba(255, 193, 7, 0.08);
    border: 1px solid rgba(255, 193, 7, 0.2);
    border-radius: 16px;
}

.notice-card h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #f59f00;
    margin-bottom: 16px;
}

.notice-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 32px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.notice-list li {
    position: relative;
    padding-left: 16px;
    font-size: 14px;
    color: #6b7684;
    line-height: 1.6;
}

.notice-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #f59f00;
}

/* ===== CTA 섹션 ===== */
.coupon-cta {
    padding: 100px 0;
    background: linear-gradient(135deg, #191f28 0%, #2d3748 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.coupon-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 30% 40%, rgba(0, 212, 170, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 70% 60%, rgba(0, 180, 216, 0.1) 0%, transparent 40%);
}

.coupon-cta .container {
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.cta-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 36px;
    background: linear-gradient(135deg, #00D4AA 0%, #00B4D8 100%);
    color: #fff;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cta-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 212, 170, 0.4);
}

.cta-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 36px;
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cta-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* 신뢰 배지 */
.cta-trust-badges {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 48px;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.trust-badge i {
    color: #00D4AA;
    font-size: 18px;
}

/* ===== 반응형 ===== */
@media (max-width: 1200px) {
    .coupon-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .coupon-featured-card {
        flex-direction: column;
    }

    .coupon-card-left {
        width: 100%;
        padding: 32px;
    }

    .coupon-card-left::after {
        display: none;
    }

    .coupon-card-right {
        flex-direction: column;
        gap: 20px;
    }

    .coupon-actions {
        align-items: flex-start;
        min-width: auto;
    }

    .coupon-meta {
        flex-direction: row;
        align-items: center;
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .coupon-hero {
        padding: 60px 0 80px;
    }

    .coupon-hero h1 {
        font-size: 32px;
    }

    .coupon-hero p {
        font-size: 16px;
    }

    .promo-timer-banner {
        flex-direction: column;
        padding: 24px;
        gap: 16px;
    }

    .timer-content {
        text-align: center;
    }

    .coupon-featured,
    .coupon-list-section,
    .coupon-cta {
        padding: 60px 0;
    }

    .section-title {
        font-size: 26px;
    }

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

    .coupon-filter-tabs {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 10px;
        flex-wrap: nowrap;
    }

    .coupon-filter-tab {
        flex-shrink: 0;
    }

    .register-card {
        flex-direction: column;
        text-align: center;
        gap: 32px;
        padding: 32px 24px;
    }

    .register-content {
        flex-direction: column;
    }

    .register-form {
        flex-direction: column;
        width: 100%;
    }

    .register-form input {
        width: 100%;
    }

    .notice-list {
        grid-template-columns: 1fr;
    }

    .cta-content h2 {
        font-size: 28px;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-btn-primary,
    .cta-btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .cta-trust-badges {
        flex-direction: column;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .coupon-hero h1 {
        font-size: 28px;
    }

    .timer-number {
        font-size: 22px;
    }

    .timer-unit {
        min-width: 40px;
    }

    .discount-value {
        font-size: 36px;
    }

    .coupon-discount-badge .discount-amount {
        font-size: 28px;
    }

    .coupon-card-body,
    .coupon-card-footer {
        padding: 20px;
    }
}

/* ===== 마이크로인터랙션 ===== */
.coupon-featured-card:active,
.coupon-card:active,
.copy-code-btn:active,
.copy-btn:active,
.register-form button:active,
.cta-btn-primary:active,
.cta-btn-secondary:active {
    transform: scale(0.98);
}

/* 복사 완료 상태 */
.copy-code-btn.copied,
.copy-btn.copied {
    background: #00D4AA;
}

.copy-code-btn.copied i::before,
.copy-btn.copied i::before {
    content: '\f00c'; /* check icon */
}

/* 접근성 */
.coupon-filter-tab:focus-visible,
.copy-code-btn:focus-visible,
.copy-btn:focus-visible {
    outline: 2px solid #00D4AA;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* 쿠폰 필터링 애니메이션 */
.coupon-card.hidden {
    display: none;
}
