* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

/* Login Page */
.login-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    text-align: center;
    margin-top: 100px;
}

.login-card h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #333;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
}

.login-card input {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 15px;
}

.login-card button {
    width: 100%;
    padding: 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.login-card button:hover {
    background: #5568d3;
}

/* Diary Page */
.diary-page header {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.diary-page h1 {
    color: #333;
    font-size: 1.8rem;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab {
    flex: 1;
    padding: 15px;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.tab.active {
    background: white;
    color: #667eea;
}

.tab-content {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.hidden {
    display: none;
}

/* Buttons */
.btn-primary {
    padding: 15px 30px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-large {
    font-size: 1.2rem;
    padding: 20px 40px;
}

.btn-secondary {
    padding: 10px 20px;
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

/* Entry Section */
.entry-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.date-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    position: relative;
}

/* .date-display {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    min-width: 280px;
    text-align: center;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.3s;
}

.date-display:hover {
    background: rgba(102, 126, 234, 0.1);
} */

.date-picker {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    min-width: 280px;
    text-align: center;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    /* transition: background 0.3s; */
}

/* .date-picker-hidden {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    font-size: 1.2rem;
    padding: 10px;
    border: 2px solid #667eea;
    border-radius: 8px;
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
} */

/* .date-picker-hidden.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
} */

.btn-icon {
    width: 45px;
    height: 45px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: #5568d3;
    transform: scale(1.05);
}

.btn-icon:active {
    transform: scale(0.95);
}

#entryText {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 200px;
}

#entryText:focus {
    outline: none;
    border-color: #667eea;
}

.status-message {
    text-align: center;
    padding: 10px;
    border-radius: 4px;
    font-weight: 500;
}

.status-message.success {
    color: #27ae60;
    background: #e8f8f5;
}

.status-message.error {
    color: #e74c3c;
    background: #ffe6e6;
}

/* Ask Section */
.ask-section input {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 15px;
}

#answerResult {
    margin-top: 30px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
}

#answerText {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

#sourcesList {
    list-style: none;
    padding: 0;
}

#sourcesList li {
    padding: 10px;
    background: white;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #666;
}

/* Stats Section */
.stats-section p {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.error {
    color: #e74c3c;
    margin-top: 15px;
    padding: 10px;
    background: #ffe6e6;
    border-radius: 4px;
}
