/* 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff;
    color: #333;
    line-height: 1.6;
    padding-top: 80px; /* 네비게이션 높이만큼 여백 추가 */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 헤더 */
.header {
    text-align: center;
    margin-bottom: 3rem;
    background: #ffffff;
    color: #333;
    padding: 3rem 2rem;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(52, 152, 219, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(52, 152, 219, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(52, 152, 219, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: none;
    position: relative;
    z-index: 1;
    color: #333;
}

.header h1 i {
    color: #3498db;
    animation: pulse 2s infinite;
}

.header p {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    opacity: 0.8;
    position: relative;
    z-index: 1;
    color: #666;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.7;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    color: #666;
}

.shortcuts {
    font-size: 0.9rem;
    opacity: 0.6;
    position: relative;
    z-index: 1;
    color: #666;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 패널 공통 스타일 */
.format-panel,
.time-panel,
.input-panel,
.options-panel,
.result-section,
.quick-convert-section,
.stats-section {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.format-panel h3,
.time-panel h3,
.input-panel h3,
.options-panel h3,
.result-section h3,
.quick-convert-section h3,
.stats-section h3 {
    color: #495057;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.format-panel h3 i,
.time-panel h3 i,
.input-panel h3 i,
.options-panel h3 i,
.result-section h3 i,
.quick-convert-section h3 i,
.stats-section h3 i {
    color: #667eea;
}

/* 포맷 설정 */
.format-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.format-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.format-group label {
    font-weight: 600;
    color: #495057;
}

.format-group select,
.format-group input {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.format-group select:focus,
.format-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.quick-formats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.quick-formats span {
    font-weight: 600;
    color: #495057;
    margin-right: 0.5rem;
}

.format-btn,
.time-btn {
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.format-btn:hover,
.time-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* 시간 설정 */
.time-options {
    margin-bottom: 1.5rem;
}

.time-settings {
    display: none;
    margin-top: 1rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.time-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.time-input-group label {
    font-weight: 600;
    color: #495057;
}

.time-input-group select,
.time-input-group input {
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    font-size: 0.9rem;
}

.quick-times {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.advanced-time-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.checkbox-item,
.radio-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    position: relative;
    padding-left: 2rem;
}

.checkbox-item input,
.radio-item input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark,
.radiomark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 20px;
    background-color: #eee;
    border-radius: 3px;
}

.radiomark {
    border-radius: 50%;
}

.checkbox-item:hover .checkmark,
.radio-item:hover .radiomark {
    background-color: #ccc;
}

.checkbox-item input:checked ~ .checkmark,
.radio-item input:checked ~ .radiomark {
    background-color: #667eea;
}

.checkmark:after,
.radiomark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-item input:checked ~ .checkmark:after {
    display: block;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.radio-item input:checked ~ .radiomark:after {
    display: block;
    top: 6px;
    left: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

/* 입력 영역 */
.input-mode {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.input-area {
    margin-bottom: 1.5rem;
}

.input-area textarea {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-family: 'Consolas', monospace;
    font-size: 0.9rem;
    resize: vertical;
    transition: all 0.3s ease;
}

.input-area textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.input-stats {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    font-family: 'Consolas', monospace;
    font-size: 0.9rem;
}

/* 변환 옵션 */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.year-filter {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.year-filter input[type="number"] {
    width: 100px;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 5px;
}

.year-filter input[type="number"]:disabled {
    background: #f8f9fa;
    color: #6c757d;
}

/* 버튼 스타일 */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover:before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,123,255,0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #545b62);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108,117,125,0.4);
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40,167,69,0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220,53,69,0.4);
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(23,162,184,0.4);
}

/* 액션 섹션 */
.action-section {
    text-align: center;
    margin: 3rem 0;
}

.action-section .btn {
    margin: 0 0.5rem;
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

/* 결과 섹션 */
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.result-format {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.result-content textarea {
    width: 100%;
    min-height: 300px;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-family: 'Consolas', monospace;
    font-size: 0.9rem;
    background: #f8f9fa;
    resize: vertical;
}

.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: center;
}

/* 빠른 변환 */
.quick-convert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.quick-convert-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.quick-convert-item label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.quick-result {
    background: white;
    padding: 1rem;
    border-radius: 5px;
    border: 1px solid #dee2e6;
    font-family: 'Consolas', monospace;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    min-height: 60px;
    display: flex;
    align-items: center;
    position: relative;
}

.copy-btn {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(23,162,184,0.4);
}

/* 통계 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-item {
    text-align: center;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #495057;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .format-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .input-actions {
        flex-direction: column;
    }

    .result-header {
        flex-direction: column;
        align-items: stretch;
    }

    .result-actions {
        flex-direction: column;
    }

    .quick-convert-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .advanced-time-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .format-panel,
    .time-panel,
    .input-panel,
    .options-panel,
    .result-section,
    .quick-convert-section,
    .stats-section {
        padding: 1rem;
    }

    .header {
        padding: 2rem 1rem;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .action-section .btn {
        display: block;
        margin: 0.5rem 0;
        width: 100%;
    }
}

/* 애니메이션 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-section,
.quick-convert-section,
.stats-section {
    animation: fadeIn 0.5s ease;
}

/* 스크롤바 스타일 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 로딩 애니메이션 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 툴팁 */
.tooltip {
    position: relative;
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
}

/* 메시지 */
.message {
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
    font-weight: 500;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
} 