/**
 * Firenze 영화 예매 시스템 - 스타일
 * 모바일 중심 트렌디한 디자인
 */

/* ==================== 기본 설정 ==================== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700;900&display=swap');

:root {
    --primary: #D32F2F;
    --primary-dark: #B71C1C;
    --primary-light: #FFCDD2;
    --secondary: #212121;
    --accent: #FFC107;
    --background: #FAFAFA;
    --surface: #FFFFFF;
    --error: #F44336;
    --success: #4CAF50;
    --text-primary: #212121;
    --text-secondary: #757575;
    --border: #E0E0E0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ==================== 컨테이너 ==================== */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    margin-bottom: 70px;
}

.page-header {
    background: linear-gradient(135deg, #120202 0%, var(--primary-dark) 100%);
    color: white;
    padding: 20px;
    margin: -20px -20px 20px -20px;
    box-shadow: var(--shadow);
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    margin: 10px 20px 0 20px;
}

.page-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin: 5px 20px 0 20px;
}

/* ==================== 카드 ==================== */
.card {
    background: var(--surface);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.card-body {
    margin-bottom: 15px;
}

/* ==================== 버튼 ==================== */
.btn {
    display: inline-block;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(211, 47, 47, 0.3);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-disabled {
    background: #BDBDBD;
    cursor: not-allowed;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
    width: auto;
}

/* ==================== 폼 ==================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.form-select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 16px;
    background: white;
    cursor: pointer;
}

.form-helper {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 6px;
}

.form-error {
    font-size: 13px;
    color: var(--error);
    margin-top: 6px;
}

/* ==================== 통계/정보 박스 ==================== */
.stat-box {
    background: linear-gradient(135deg, #120202 0%, #1c85b7 100%);
    color: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.stat-value {
    font-size: 36px;
    font-weight: 900;
    margin: 10px 0;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.info-value {
    font-weight: 600;
    font-size: 14px;
}

/* ==================== 뱃지 ==================== */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-pending {
    background: #FFF3E0;
    color: #F57C00;
}

.badge-confirmed {
    background: #E8F5E9;
    color: #2E7D32;
}

.badge-used {
    background: #E0E0E0;
    color: #616161;
}

.badge-cancelled {
    background: #FFEBEE;
    color: #C62828;
}

/* ==================== 네비게이션 ==================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    display: flex;
    justify-content: space-around;
    padding: 6px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.nav-item {
    flex: 1;
    text-align: center;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 4px;
    transition: all 0.3s ease;
}

.nav-item.active {
    color: var(--primary);
}

.nav-icon {
    font-size: 22px;
    display: block;
    margin-bottom: 2px;
}

.nav-label {
    font-size: 11px;
    display: block;
}

/* ==================== QR 코드 ==================== */
.qr-container {
    text-align: center;
    padding: 30px 20px;
}

.qr-code {
    display: inline-block;
    padding: 20px;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    margin: 20px 0;
}

.qr-code img {
    max-width: 100%;
    height: auto;
}

/* ==================== 티켓 카드 ==================== */
.ticket-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.ticket-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {

    0%,
    100% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    50% {
        transform: translate(-50%, -50%) rotate(180deg);
    }
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ticket-logo {
    font-size: 24px;
    font-weight: 900;
    color: var(--primary);
}

.ticket-info {
    margin-bottom: 15px;
}

.ticket-movie {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
}

.ticket-detail {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 5px;
}

/* ==================== 알림 ==================== */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.alert-success {
    background: #E8F5E9;
    color: #2E7D32;
    border-left: 4px solid #4CAF50;
}

.alert-error {
    background: #FFEBEE;
    color: #C62828;
    border-left: 4px solid #F44336;
}

.alert-info {
    background: #E3F2FD;
    color: #1565C0;
    border-left: 4px solid #2196F3;
}

.alert-warning {
    background: #FFF3E0;
    color: #E65100;
    border-left: 4px solid #FF9800;
}

/* ==================== 로딩 ==================== */
.loading {
    text-align: center;
    padding: 40px 20px;
}

.spinner {
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ==================== 모달 ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

.modal-body {
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    gap: 10px;
}

/* ==================== 유틸리티 ==================== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-primary {
    color: var(--primary);
}

.text-success {
    color: var(--success);
}

.text-error {
    color: var(--error);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-bold {
    font-weight: 700;
}

.text-large {
    font-size: 20px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

.p-20 {
    padding: 20px;
}

.hidden {
    display: none !important;
}

/* ==================== 반응형 ==================== */
@media (max-width: 360px) {
    .container {
        padding: 15px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .card {
        padding: 15px;
    }
}

/* ==================== 애니메이션 ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* ==================== 프린트 스타일 ==================== */
@media print {
    body {
        background: white;
    }

    .bottom-nav,
    .btn,
    .page-header {
        display: none;
    }
}