/* ===== GLASSMORPHISM DESIGN SYSTEM ===== */
/* Phase 1: Premium Glass Effect Foundation */

:root {
    /* Premium Color Palette */
    --sky-50: #F0F9FF;
    --sky-100: #E0F2FE;
    --sky-200: #BAE6FD;
    --sky-300: #7DD3FC;
    --sky-400: #38BDF8;
    --sky-500: #0EA5E9;
    --sky-600: #0284C7;
    
    --ocean-400: #60A5FA;
    --ocean-500: #3B82F6;
    --ocean-600: #2563EB;
    --ocean-700: #1D4ED8;
    --ocean-800: #1E40AF;
    --ocean-900: #1E3A8A;
    
    /* Glass Effects */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-bg-solid: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --glass-blur: blur(20px);
    --glass-blur-heavy: blur(40px);
    
    /* Text Colors */
    --text-primary: #0F172A;
    --text-secondary: #334155;
    --text-light: #64748B;
    --text-on-glass: #1E293B;
    
    /* Gradients */
    --gradient-sky: linear-gradient(135deg, #87CEEB 0%, #0EA5E9 100%);
    --gradient-ocean: linear-gradient(135deg, #0EA5E9 0%, #1E40AF 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    --gradient-shimmer: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.7) 50%, transparent 60%);
    
    /* Animations */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-glass: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Global Reset with Premium Feel */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(135deg, #E0F2FE 0%, #BAE6FD 50%, #7DD3FC 100%);
    min-height: 100vh;
    color: var(--text-primary);
    position: relative;
    overflow-x: hidden;
}

/* Static Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(14, 165, 233, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(125, 211, 252, 0.1) 0%, transparent 50%);
    z-index: -1;
}

/* Glass Card Base */
.glass-card {
    background: var(--glass-bg-solid);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: var(--transition-glass);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-shimmer);
    transition: left 0.5s ease;
}

.glass-card:hover::before {
    left: 100%;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 12px 40px 0 rgba(31, 38, 135, 0.45),
        inset 0 1px 0 0 rgba(255,255,255,0.3);
}

/* Glass Morphism Utilities */
.glass-light {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.glass-dark {
    background: rgba(30, 58, 138, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.glass-border {
    border: 1px solid var(--glass-border);
}

/* Premium Buttons */
.btn-glass {
    padding: 12px 28px;
    background: var(--glass-bg-solid);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-on-glass);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition-glass);
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.btn-glass::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-glass:hover::after {
    width: 300px;
    height: 300px;
}

.btn-glass:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 10px 30px rgba(14, 165, 233, 0.3),
        inset 0 1px 0 rgba(255,255,255,0.4);
}

.btn-primary {
    background: var(--gradient-ocean);
    color: white;
    border: none;
}

.btn-secondary {
    background: var(--gradient-sky);
    color: white;
    border: none;
}

/* Floating Elements */
.floating {
    animation: floating 6s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Glow Effects */
.glow-soft {
    box-shadow: 
        0 0 20px rgba(14, 165, 233, 0.5),
        0 0 40px rgba(14, 165, 233, 0.3);
}

/* Container Enhancement */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
    position: relative;
    z-index: 1;
}

/* Typography Enhancement */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.875rem; }

/* Input Fields Glass Style */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 16px;
    color: var(--text-primary);
    transition: var(--transition-smooth);
    width: 100%;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--sky-500);
    box-shadow: 
        0 0 0 4px rgba(14, 165, 233, 0.1),
        inset 0 1px 2px rgba(0,0,0,0.05);
    background: rgba(255, 255, 255, 1);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-sky);
    border-radius: 6px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-ocean);
    background-clip: content-box;
}

/* Loading Animation */
.loading-glass {
    position: relative;
    overflow: hidden;
}

.loading-glass::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}


/* ===== PRESERVED SECTIONS ===== */

=== 운영자 제어판 전용 스타일 === */

/* 운영자 헤더 */
.operator-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.date-control {
    display: flex;
    align-items: center;
    gap: 15px;
}

.date-control label {
    font-weight: 600;
    color: #2E86AB;
}

.date-input {
    padding: 8px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
}

/* 긴급 발송 컨트롤 */
.emergency-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.emergency-duration {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.9);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.emergency-duration input {
    width: 50px;
    padding: 4px 6px;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    text-align: center;
    font-size: 14px;
}

.emergency-duration label {
    font-size: 12px;
    color: #666;
    font-weight: normal;
}

.btn-emergency {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255,107,107,0.3);
    transition: all 0.3s ease;
}

.btn-emergency:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,107,107,0.4);
}

/* 라벨 카드 */
.label-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.label-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.label-header {
    background: linear-gradient(135deg, #2E86AB, #1B5E7D);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.label-header:hover {
    background: linear-gradient(135deg, #1B5E7D, #2E86AB);
}

.label-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.label-badge {
    background: rgba(255,255,255,0.2);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 1.2em;
    font-weight: bold;
}

.label-info {
    font-size: 0.9em;
    opacity: 0.9;
}

.expand-icon {
    font-size: 1.2em;
    transition: transform 0.3s ease;
}

.label-card.collapsed .expand-icon {
    transform: rotate(-90deg);
}

.label-content {
    padding: 20px;
    transition: all 0.3s ease;
}

.label-card.collapsed .label-content {
    display: none;
}

/* 빠른 추가 섹션 */
.quick-add-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.quick-add-header input[type="time"] {
    width: 140px;
    padding: 6px 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
}

/*시간추가 패널*/
.quick-add-header .duration-input {
    width: 80px;
}

.quick-add-header button {
    padding: 6px 12px;
    font-size: 14px;
}

.quick-add-label {
    font-size: 12px;
    color: #666;
    margin: 0 5px;
}

/* 스케줄 테이블 */
.schedule-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.schedule-table th {
    background: #f8f9fa;
    color: #495057;
    padding: 8px 12px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    font-size: 14px;
}

.schedule-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.schedule-table tr:hover {
    background: #f8f9fa;
}

/* 시간 입력 필드 */
.time-input-field {
    border: 1px solid transparent;
    background: transparent;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    width: 140px;
    transition: all 0.2s ease;
}

.time-input-field:hover {
    border-color: #dee2e6;
    background: #f8f9fa;
}

.time-input-field:focus {
    border-color: #2E86AB;
    background: white;
    outline: none;
    box-shadow: 0 0 0 2px rgba(46,134,171,0.1);
}

.time-input-field.error {
    border-color: #dc3545;
    background: #f8d7da;
}

/* 시간 상태 아이콘 */
.time-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.time-icon {
    font-size: 16px;
}

.time-icon.past {
    color: #6c757d;
}

.time-icon.imminent {
    color: #ffc107;
    animation: pulse-warning 1.5s infinite;
}

.time-icon.future {
    color: #28a745;
}

@keyframes pulse-warning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* 시간 조정 버튼 그룹 */
.time-controls {
    display: flex;
    gap: 2px;
}

.time-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s ease;
    min-width: 35px;
}

.time-btn:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.time-btn.decrease {
    background: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.time-btn.increase {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

/* 재생 제어 */
.play-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-play {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
}

.btn-play:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(40,167,69,0.3);
}

.duration-input {
    width: 45px;
    padding: 4px 6px;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    font-size: 12px;
    text-align: center;
}

/* 삭제 버튼 */
.delete-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 3px;
    opacity: 0.6;
    transition: all 0.2s ease;
    font-size: 16px;
}

.delete-btn:hover {
    opacity: 1;
    background: #f8d7da;
    transform: scale(1.1);
}

/* 빈 스케줄 */
.no-schedule {
    text-align: center;
    padding: 30px;
    color: #666;
    font-style: italic;
}

/* 정렬 가능한 헤더 */
.sortable-header {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.sortable-header:hover {
    background: #e9ecef;
}

.sort-indicator {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
    font-size: 12px;
}

.sort-indicator.active {
    opacity: 1;
}

/* 




/* Final Polish - Phase 5 */

/* Smooth Page Transitions */
* {
    transition: none;
}

a, button, input, select, textarea, .btn, .card, .glass-card {
    transition: var(--transition-smooth);
}

/* Premium Focus States */
:focus {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--sky-500);
    outline-offset: 4px;
}

/* Selection Color */
::selection {
    background: rgba(14, 165, 233, 0.2);
    color: var(--ocean-700);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .glass-card {
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }
    
    body {
        background-attachment: fixed;
    }
}

/* Print Styles */
@media print {
    .glass-card {
        background: white !important;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    body {
        background: white !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .glass-card {
        background: rgba(255, 255, 255, 0.98);
        border: 2px solid var(--text-primary);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support (Future) */
@media (prefers-color-scheme: dark) {
    /* Reserved for future dark mode implementation */
}

/* Performance Optimizations */
.glass-card {
    will-change: transform;
    transform: translateZ(0);
}

/* Loading Performance */
.loading-glass {
    pointer-events: none;
    opacity: 0.7;
}

/* Image Optimization */
img {
    loading: lazy;
    decoding: async;
}

/* Font Display Optimization */
@font-face {
    font-display: swap;
}



/* ===== LOGO & BRANDING ENHANCEMENT ===== */

/* Logo Animation & Effects */
.logo-container {
    position: relative;
    display: inline-block;
}

.logo-container img,
.logo-section img,
img[src*="logo_"] {
    filter: drop-shadow(0 4px 20px rgba(14, 165, 233, 0.3));
    transition: all 0.4s ease;
    will-change: transform, filter;
}

.logo-container img:hover,
.logo-section img:hover {
    transform: translateY(-5px) scale(1.05);
    filter: drop-shadow(0 8px 30px rgba(14, 165, 233, 0.5));
}

/* Logo Glow Effect */
.logo-glow {
    position: relative;
}

.logo-glow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.logo-glow:hover::before {
    opacity: 1;
}

/* Company Name with Logo */
.company-name {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #0EA5E9 0%, #1E40AF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
}

.company-name::after {
    content: 'PLANBEAR';
    position: absolute;
    left: 0;
    top: 0;
    background: linear-gradient(135deg, #1E40AF 0%, #0EA5E9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.company-name:hover::after {
    opacity: 1;
}

/* Favicon in Tab Enhancement */
link[rel="icon"] {
    /* This won't actually style the favicon, but ensures it's loaded */
}

/* Header Logo Special Effects */
.glass-header .logo-section img {
    height: 50px;
    width: auto;
    animation: subtle-float 6s ease-in-out infinite;
}

@keyframes subtle-float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Login Page Logo Enhancement */
.login-logo .logo-container {
    position: relative;
    display: inline-block;
    padding: 30px;
    background: radial-gradient(circle at center, rgba(14, 165, 233, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse-light 3s ease-in-out infinite;
}

@keyframes pulse-light {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.4);
        background-size: 100%;
    }
    50% { 
        box-shadow: 0 0 0 20px rgba(14, 165, 233, 0);
        background-size: 110%;
    }
}

.login-logo .logo-container img {
    width: 150px;
    height: auto;
    display: block;
}

/* Admin/Operator Header Logo */
.admin-header .logo-section,
.operator-header .logo-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.admin-header img[src*="logo"],
.operator-header img[src*="logo"] {
    height: 60px;
    width: auto;
    filter: 
        drop-shadow(0 4px 20px rgba(14, 165, 233, 0.3))
        brightness(1.05);
}

/* Player Page Logo (if added) */
.player-logo {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.player-logo:hover {
    opacity: 1;
}

.player-logo img {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.2));
}

/* Responsive Logo Sizing */
@media (max-width: 768px) {
    .glass-header .logo-section img {
        height: 40px;
    }
    
    .login-logo .logo-container img {
        width: 120px;
    }
    
    .company-name {
        font-size: 20px;
    }
}

/* High DPI Logo Support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    img[src*="logo"] {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Logo Loading Animation */
img[src*="logo"] {
    opacity: 0;
    animation: fadeInLogo 0.6s ease-out forwards;
}

@keyframes fadeInLogo {
    to {
        opacity: 1;
    }
}

/* Brand Colors from Logo */
:root {
    --brand-sky: #87CEEB;     /* From company description */
    --brand-ocean: #006994;   /* From company description */
    --brand-white: #FFFFFF;   /* From company description */
}

/* Apply Brand Colors to Key Elements */
.btn-primary {
    background: linear-gradient(135deg, var(--brand-sky) 0%, var(--brand-ocean) 100%);
}

.glass-card:hover {
    border-color: var(--brand-sky);
}

/* Favicon Animation for Loading State */
@keyframes favicon-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Add this class to body when loading */
body.loading link[rel="icon"] {
    /* Browsers don't actually support this, but it's here for completeness */
    animation: favicon-spin 1s linear infinite;
}
