/* 기본 리셋 및 폰트 설정 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* 화면 전환 관리 */
.screen {
    display: none;
    min-height: 100vh;
    width: 100%;
}

.screen.active {
    display: block;
}

/* 로그인 화면 스타일 */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    text-align: center;
}

.logo-section {
    margin-bottom: 40px;
}

.main-title {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 20px;
}

.features-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 40px;
    max-width: 400px;
    width: 100%;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.feature-icon {
    font-size: 2rem;
    color: white;
    margin-bottom: 10px;
}

.feature-item span {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 300px;
}

.login-input {
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
}

.login-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

.login-button {
    padding: 15px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.login-button:hover {
    transform: translateY(-2px);
}

/* 헤더 스타일 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header h2 {
    color: #333;
    font-size: 1.5rem;
}

.month-navigation {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.nav-btn:hover {
    background-color: rgba(0,0,0,0.1);
}

.logout-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #ff6b6b;
    cursor: pointer;
    padding: 12px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.logout-btn:hover {
    background-color: rgba(255,107,107,0.1);
    transform: translateY(-1px);
}

.back-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.back-text {
    font-size: 0.9rem;
    color: #666;
}

.back-btn:hover {
    background-color: rgba(0,0,0,0.1);
    transform: translateX(-2px);
}

/* 캘린더 스타일 */
.calendar-container {
    padding: 20px;
    background: white;
    margin: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.weekday {
    text-align: center;
    padding: 8px 2px;
    font-weight: 600;
    color: #666;
    font-size: 0.85rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    font-weight: 500;
    min-height: 45px;
    max-height: 55px;
    font-size: 1rem;
}

.calendar-day:hover {
    background-color: #f0f0f0;
}

.calendar-day.has-record {
    color: #1976d2;
    font-weight: 600;
}

.calendar-day.has-record::after {
    content: '⭐';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 0.7rem;
    color: #ffd700;
    text-shadow: 0 0 2px rgba(0,0,0,0.3);
}

.calendar-day.other-month {
    color: #ccc;
}

.calendar-day.today {
    color: #ff6b6b;
    font-weight: 700;
}

.calendar-day.today::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 28px;
    height: 28px;
    border: 2px solid #ff6b6b;
    border-radius: 50%;
    z-index: -1;
}

/* 플로팅 액션 버튼 */
.fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    border: none;
    color: white;
    font-size: 2.2rem;
    cursor: pointer;
    box-shadow: 0 6px 25px rgba(0,0,0,0.4);
    transition: all 0.3s;
    z-index: 1000;
}

.fab:hover {
    transform: scale(1.15);
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

/* 일일 기록 화면 */
.daily-records {
    padding: 20px;
    background: white;
    margin: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.records-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.record-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #ff6b6b;
}

.record-time {
    font-weight: 600;
    color: #666;
    min-width: 80px;
}

.record-content {
    flex: 1;
    color: #333;
    line-height: 1.5;
}

.ai-summary-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: transform 0.2s;
}

.ai-summary-btn:hover {
    transform: translateY(-2px);
}

.ai-summary {
    margin: 20px;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.ai-summary.hidden {
    display: none;
}

.ai-summary h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.summary-content {
    color: #666;
    line-height: 1.6;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

/* 기록 입력 화면 */
.input-container {
    padding: 20px;
    background: white;
    margin: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.input-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    transition: all 0.2s;
}

.tab-btn.active {
    color: #ff6b6b;
    border-bottom: 2px solid #ff6b6b;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.voice-input-area {
    text-align: center;
    padding: 40px 20px;
}

.voice-status {
    margin-bottom: 30px;
}

.voice-status i {
    font-size: 3rem;
    color: #ff6b6b;
    margin-bottom: 15px;
}

.voice-status p {
    color: #666;
    font-size: 1.1rem;
}

.voice-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.voice-btn:hover {
    transform: scale(1.05);
}

.voice-text {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    min-height: 100px;
    text-align: left;
    color: #333;
}

.recording-status {
    margin-top: 20px;
    text-align: center;
}

.recording-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #ff6b6b;
    font-weight: 600;
}

.recording-indicator i {
    animation: pulse 1.5s infinite;
    color: #ff6b6b;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.text-input-area {
    padding: 20px 0;
}

.text-area {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 2px solid #f0f0f0;
    border-radius: 10px;
    font-size: 1rem;
    resize: vertical;
    font-family: inherit;
}

.text-area:focus {
    outline: none;
    border-color: #ff6b6b;
}

.input-actions {
    margin-top: 30px;
    text-align: center;
}

.save-btn {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 25px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.save-btn:hover {
    transform: translateY(-2px);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .main-title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .features-section {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .month-navigation {
        order: 2;
    }
    
    .logout-btn {
        font-size: 1.3rem;
        padding: 10px;
    }
    
    .calendar-container,
    .daily-records,
    .input-container {
        margin: 10px;
    }
    
    .weekday,
    .calendar-day {
        font-size: 0.85rem;
    }
    
    .calendar-day {
        min-height: 40px;
        max-height: 50px;
    }
    
    .fab {
        bottom: 20px;
        right: 20px;
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
    
    .record-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .record-time {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 15px;
    }
    
    .main-title {
        font-size: 1.8rem;
    }
    
    .logout-btn {
        font-size: 1.2rem;
        padding: 8px;
    }
    
    .logout-btn span,
    .back-text {
        display: none;
    }
    
    .calendar-container,
    .daily-records,
    .input-container {
        margin: 5px;
        border-radius: 10px;
    }
    
    .header {
        padding: 15px;
    }
    
    .weekday,
    .calendar-day {
        font-size: 0.8rem;
    }
    
    .fab {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        bottom: 15px;
        right: 15px;
    }
    
    .calendar-day {
        min-height: 35px;
        max-height: 42px;
    }
    
    .calendar-day.today::before {
        width: 24px;
        height: 24px;
    }
}
