/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: '맑은 고딕', 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
    font-weight: 300; /* Semilight */
    background: linear-gradient(135deg, #4285f4 0%, #34a853 50%, #ea4335 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1800px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-title i {
    color: #4285f4;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.week-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.week-dropdown {
    padding: 0.5rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    min-width: 150px;
    transition: all 0.3s ease;
}

.week-dropdown:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.header-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Button Styles */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #4285f4, #34a853);
    color: white;
}

.btn-secondary {
    background: #718096;
    color: white;
}

.btn-success {
    background: #48bb78;
    color: white;
}

.btn-danger {
    background: #f56565;
    color: white;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Main Content */
.main-content {
    max-width: 1800px;
    margin: 0 auto;
    padding: 2rem;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    min-height: calc(100vh - 200px);
}

/* Panel Styles */
.left-panel,
.right-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.panel-header {
    background: linear-gradient(135deg, #4285f4, #34a853);
    color: white;
    padding: 1.5rem;
}

.panel-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Project Creator */
.project-creator {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.input-group {
    display: flex;
    gap: 1rem;
    align-items: stretch;
}

.project-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.project-input:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

/* Projects Container */
.projects-container {
    padding: 1rem;
    max-height: 600px;
    overflow-y: auto;
}

.project-box {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.project-box:hover {
    border-color: #4285f4;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.1);
}

.project-header {
    background: linear-gradient(135deg, #f7fafc, #edf2f7);
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

.project-header:hover {
    background: linear-gradient(135deg, #edf2f7, #e2e8f0);
}

.project-toggle-btn {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #4285f4;
    transition: transform 0.3s ease;
    padding: 0.25rem;
}

.project-toggle-btn.collapsed {
    transform: rotate(-90deg);
}

.project-title {
    font-weight: 600;
    color: #2d3748;
}

.project-controls {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.project-content {
    padding: 1rem;
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.project-content.collapsed {
    max-height: 0;
    padding: 0 1rem;
    overflow: hidden;
}

.task-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.task-input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
}

.task-list {
    list-style: none;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.task-item.completed {
    opacity: 0.6;
    text-decoration: line-through;
}

.task-checkbox {
    margin-right: 0.5rem;
}

.task-text {
    flex: 1;
}

.task-delete {
    background: none;
    border: none;
    color: #f56565;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.task-delete:hover {
    background: #fed7d7;
}

/* Weekly Schedule Container */
.weekly-schedule-container {
    padding: 1rem;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
}

.weekly-schedule-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid #dee2e6;
}

.weekly-schedule-table th {
    background: #f8f9fa;
    color: #2d3748;
    padding: 0.75rem;
    text-align: center;
    font-weight: 500;
    border-bottom: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
}

.weekly-schedule-table th.time-header {
    width: 120px;
}

.weekly-schedule-table th.task-header {
    width: auto;
}

.weekly-schedule-table th:last-child {
    border-right: none;
}

.weekly-schedule-table td {
    padding: 0.5rem;
    border-bottom: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    vertical-align: middle;
}

.weekly-schedule-table td:last-child {
    border-right: none;
}

.weekly-time-cell {
    background: #f8f9fa;
    font-weight: 400;
    text-align: left;
    color: #2d3748;
    padding-left: 0.75rem;
    width: 120px;
}

.weekly-task-cell {
    padding: 0;
}

.day-separator {
    background: linear-gradient(135deg, #4285f4, #34a853);
    color: white;
    font-weight: 600;
    text-align: center;
    padding: 0.75rem;
}

.day-separator td {
    border-bottom: 2px solid #dee2e6;
}

.weekly-schedule-input {
    width: 100%;
    padding: 0.5rem;
    border: none;
    font-size: 0.85rem;
    font-family: '맑은 고딕', 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
    font-weight: 300;
    min-height: 45px;
    resize: none;
    background: transparent;
    outline: none;
}

.weekly-schedule-input:focus {
    background: rgba(66, 133, 244, 0.05);
}

.weekly-schedule-checkbox {
    transform: scale(1.1);
    margin-left: 8px;
}

.schedule-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.schedule-checkbox {
    margin-top: 0.5rem;
}

/* World Time Panel */
.world-time-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: transform 0.3s ease;
}

.world-time-panel.collapsed {
    transform: translateY(calc(100% - 60px));
}

.world-time-header {
    padding: 1rem 2rem;
}

.world-time-toggle {
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4a5568;
    transition: color 0.3s ease;
}

.world-time-toggle:hover {
    color: #667eea;
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.world-time-panel.collapsed .toggle-icon {
    transform: rotate(180deg);
}

.world-time-content {
    padding: 0 2rem 2rem;
    max-height: 300px;
    overflow-y: auto;
}

.time-input-section {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.time-input {
    padding: 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
}

.world-times-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.time-zone-card {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.time-zone-name {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.country-flag {
    font-size: 1.2rem;
}

.time-zone-time {
    font-size: 1.1rem;
    color: #4285f4;
    font-weight: 500;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    background: linear-gradient(135deg, #4285f4, #34a853);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 2rem;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

/* View Styles */
.view-header {
    margin-bottom: 2rem;
}

.view-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
}

/* Item List */
.item-list {
    display: grid;
    gap: 1rem;
}

.item-card {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.item-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.item-card.selected {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.item-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.item-title {
    font-weight: 600;
    color: #2d3748;
    font-size: 1.1rem;
}

.item-meta {
    font-size: 0.85rem;
    color: #718096;
}

.item-preview {
    color: #4a5568;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #4a5568;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: 'Noto Sans KR', sans-serif;
    transition: border-color 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .left-panel {
        order: 2;
    }
    
    .right-panel {
        order: 1;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .header-controls {
        flex-direction: column;
        width: 100%;
    }
    
    .week-selector {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }
    
    .week-dropdown {
        width: 100%;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .weekly-schedule-container {
        padding: 0.5rem;
    }
    
    .weekly-schedule-table th,
    .weekly-schedule-table td {
        padding: 0.4rem 0.25rem;
        font-size: 0.8rem;
    }
    
    .weekly-time-cell {
        font-size: 0.75rem;
    }
    
    .weekly-schedule-input {
        min-height: 35px;
        font-size: 0.8rem;
        padding: 0.4rem;
    }
    
    .day-separator {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .world-times-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.5rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .view-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .input-group {
        flex-direction: column;
    }
    
    .task-input-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .schedule-table {
        font-size: 0.75rem;
    }
    
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
    
    .world-time-content {
        padding: 0 1rem 1rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Loading and Animation States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Day Tabs */
.day-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-bottom: 2px solid #e2e8f0;
}

.day-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    background: #e9ecef;
    color: #495057;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.day-tab:hover {
    background: #dee2e6;
}

.day-tab.active {
    background: linear-gradient(135deg, #82c91e, #51cf66);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(81, 207, 102, 0.3);
}

/* Day Schedule Visibility */
.day-schedule {
    display: none;
}

.day-schedule.active {
    display: block;
}

.daily-schedules-container {
    padding: 1.5rem;
    background: white;
    min-height: 500px;
}

/* Day Schedule Header - Enhanced Design */
.day-schedule-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.day-name {
    font-size: 1.5rem;
    font-weight: 700;
}

.day-eng {
    font-size: 1rem;
    opacity: 0.9;
    margin-left: 0.5rem;
}

.day-date {
    font-size: 1.2rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

/* Day Schedule Table - Wider Task Column */
.day-schedule-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.day-schedule-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.8rem;
    text-align: left;
    font-weight: 600;
}

.day-schedule-table td {
    padding: 0.5rem;
    border: 1px solid #e0e0e0;
}

.day-time-cell {
    font-weight: 500;
    color: #555;
    text-align: center;
}

.day-task-cell {
    width: 100%; /* 가로로 최대한 확장 */
}

.weekly-schedule-input {
    width: 100%;
    min-height: 60px;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
    font-family: inherit;
}

.day-check-cell {
    text-align: center;
}

.day-check-cell input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}
