/*
Theme Name: Market Calendar
Description: 증시 캘린더 테마 - 주요 경제 지표 발표일, 실적 발표 일정 등 투자 캘린더 제공
Author: InvestPro Team
Version: 1.0
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Header Styles - matching original HTML */
.header {
    background: #1e293b;
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: #3b82f6;
    text-decoration: none;
}

.logo i {
    margin-right: 10px;
    font-size: 2rem;
}

.search-container {
    position: relative;
    flex: 1;
    max-width: 400px;
    margin: 0 20px;
}

.search-input {
    width: 100%;
    padding: 12px 50px 12px 15px;
    border: 1px solid #475569;
    border-radius: 25px;
    background: #334155;
    color: white;
    font-size: 14px;
}

.search-input::placeholder {
    color: #94a3b8;
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #3b82f6;
    border: none;
    border-radius: 20px;
    width: 40px;
    height: 40px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background: #2563eb;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-item {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-item:hover {
    color: #3b82f6;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #3b82f6;
    transition: width 0.3s ease;
}

.nav-item:hover::after {
    width: 100%;
}

/* Calendar Header */
.calendar-header {
    background: linear-gradient(135deg, #a18cd1, #fbc2eb);
    color: #2d3748;
    padding: 3rem 0;
    text-align: center;
}

.calendar-header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.calendar-header p {
    font-size: 1.2rem;
    margin-bottom: 0;
}

/* Calendar Content */
.calendar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Back Button */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #3182ce;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.back-btn:hover {
    background: #2c5aa0;
    transform: translateY(-2px);
    text-decoration: none;
    color: white;
}

/* Calendar Controls */
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.month-navigation {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-btn {
    background: #a18cd1;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: #8b5cf6;
    transform: scale(1.1);
}

.current-month {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    min-width: 200px;
    text-align: center;
}

.view-options {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #a18cd1;
    background: white;
    color: #a18cd1;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.view-btn.active,
.view-btn:hover {
    background: #a18cd1;
    color: white;
}

/* Legend */
.legend {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

/* Calendar Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.calendar-header-cell {
    background: #a18cd1;
    color: white;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
}

.calendar-cell {
    background: white;
    min-height: 120px;
    padding: 0.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.calendar-cell:hover {
    background: #f7fafc;
}

.calendar-cell.other-month {
    background: #f7fafc;
    color: #a0aec0;
}

.calendar-cell.today {
    background: linear-gradient(135deg, #a18cd1, #fbc2eb);
    color: white;
}

.date-number {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.event-item {
    background: #667eea;
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
    margin-bottom: 0.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.event-item:hover {
    transform: scale(1.05);
}

.event-earnings { background: #38a169; }
.event-economic { background: #3182ce; }
.event-fed { background: #e53e3e; }
.event-holiday { background: #718096; }

/* Upcoming Events */
.upcoming-events {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #a18cd1;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.event-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.event-card:hover {
    border-color: #a18cd1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.event-date {
    background: #a18cd1;
    color: white;
    padding: 0.5rem;
    border-radius: 8px;
    text-align: center;
    min-width: 60px;
    font-weight: 600;
}

.event-info {
    flex: 1;
}

.event-title {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.3rem;
}

.event-description {
    color: #718096;
    font-size: 0.9rem;
}

.event-importance {
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.importance-high { background: #fed7d7; color: #742a2a; }
.importance-medium { background: #faf089; color: #744210; }
.importance-low { background: #c6f6d5; color: #22543d; }

/* Stock Ticker Footer - matching original HTML */
.stock-ticker-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1e293b;
    color: white;
    padding: 8px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.ticker-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 20px;
}

.ticker-label {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #3b82f6;
    white-space: nowrap;
}

.ticker-label i {
    margin-right: 8px;
    font-size: 1.1rem;
}

.ticker-text {
    font-size: 0.9rem;
}

.ticker-content {
    flex: 1;
    display: flex;
    gap: 30px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ticker-content::-webkit-scrollbar {
    display: none;
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-size: 0.85rem;
}

.ticker-name {
    font-weight: 600;
    color: #cbd5e1;
}

.ticker-value {
    font-weight: 600;
    color: white;
}

.ticker-change {
    font-weight: 500;
}

.ticker-change.positive {
    color: #10b981;
}

.ticker-change.negative {
    color: #ef4444;
}

.ticker-time {
    font-size: 0.75rem;
    color: #94a3b8;
    white-space: nowrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-container {
        order: 3;
        margin: 0;
        max-width: 100%;
    }
    
    .nav-menu {
        order: 2;
        gap: 20px;
    }
    
    .calendar-header h1 {
        font-size: 2rem;
    }
    
    .calendar-content {
        padding: 1rem;
    }
    
    .calendar-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .month-navigation {
        justify-content: center;
    }
    
    .view-options {
        justify-content: center;
    }
    
    .calendar-grid {
        font-size: 0.8rem;
    }
    
    .calendar-cell {
        min-height: 80px;
        padding: 0.3rem;
    }
    
    .event-item {
        font-size: 0.6rem;
        padding: 0.1rem 0.3rem;
    }
    
    .ticker-container {
        flex-direction: column;
        gap: 10px;
        padding: 10px 20px;
    }
    
    .ticker-content {
        justify-content: center;
        gap: 20px;
    }
    
    .ticker-time {
        text-align: center;
    }
}