* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* ============================================
   LOGIN PAGE STYLES
   ============================================ */
.login-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, transparent),
        radial-gradient(2px 2px at 60px 70px, #fff, transparent),
        radial-gradient(1px 1px at 50px 50px, #ddd, transparent),
        radial-gradient(1px 1px at 130px 80px, #fff, transparent),
        radial-gradient(2px 2px at 90px 10px, #fff, transparent);
    background-size: 200px 200px;
    animation: twinkle 3s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.login-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 50px 40px;
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 450px;
    width: 90%;
    animation: slideIn 0.6s ease-out;
    position: relative;
    z-index: 1;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lock-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.login-title {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 10px;
    font-weight: 700;
}

.login-subtitle {
    color: #764ba2;
    margin-bottom: 30px;
    font-size: 16px;
}

.login-form {
    margin-bottom: 20px;
}

.input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.password-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 16px;
    transition: all 0.3s;
    outline: none;
}

.password-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
}

.login-button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.login-button:active {
    transform: translateY(0);
}

.error-message {
    color: #e74c3c;
    margin-top: 15px;
    font-weight: 500;
    min-height: 20px;
}

.login-hint {
    margin-top: 20px;
    padding: 15px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 15px;
    color: #667eea;
}

/* ============================================
   DIARY PAGE STYLES
   ============================================ */
.diary-body {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    min-height: 100vh;
    padding: 20px;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.diary-header {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.diary-title {
    font-size: 32px;
    color: #ff6b6b;
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.title-icon {
    font-size: 36px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.nav-link {
    padding: 10px 20px;
    background: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 20px;
    color: #666;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s;
}

.nav-link:hover {
    background: #e8e8e8;
    color: #ff6b6b;
}

.nav-link.active {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: white;
    border-color: #ff6b6b;
}

.logout-button {
    padding: 12px 25px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    border: none;
    border-radius: 25px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.logout-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.diary-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .diary-content {
        grid-template-columns: 1fr;
    }
    
    .diary-header {
        padding: 20px;
    }
    
    .entry-form-card {
        padding: 20px;
    }
}

.entry-form-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    box-sizing: border-box;
}

.form-title {
    color: #ff6b6b;
    margin-bottom: 25px;
    font-size: 24px;
}

.entry-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.form-group input[type="date"],
.form-group select,
.form-group textarea {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s;
    font-family: inherit;
}

.form-group input[type="date"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.form-group textarea {
    resize: vertical;
}

.emoji-rating {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 15px 0;
}

.emoji-rating input[type="radio"] {
    display: none;
}

.emoji-rating label {
    font-size: 40px;
    cursor: pointer;
    transition: all 0.3s;
    filter: grayscale(100%);
    opacity: 0.5;
}

.emoji-rating label:hover {
    transform: scale(1.2);
    filter: grayscale(0%);
    opacity: 1;
}

.emoji-rating input[type="radio"]:checked + label {
    transform: scale(1.3);
    filter: grayscale(0%);
    opacity: 1;
}

.sliders-grid {
    display: grid;
    gap: 20px;
}

.slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ff6b6b;
    cursor: pointer;
    transition: all 0.3s;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ff6b6b;
    cursor: pointer;
    border: none;
}

.slider-value {
    display: inline-block;
    min-width: 30px;
    padding: 4px 10px;
    background: #ff6b6b;
    color: white;
    border-radius: 20px;
    font-weight: 600;
    text-align: center;
    font-size: 14px;
}

.submit-button {
    padding: 15px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    border: none;
    border-radius: 15px;
    color: white;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.4);
}

.submit-button:active {
    transform: translateY(0);
}

/* ============================================
   ENTRIES LIST STYLES
   ============================================ */
.entries-section {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.section-title {
    color: #ff6b6b;
    margin-bottom: 20px;
    font-size: 24px;
}

.entries-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 700px;
    overflow-y: auto;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 18px;
}

.entry-card {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 50%);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.entry-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.entry-date {
    font-weight: 700;
    font-size: 18px;
    color: #ff6b6b;
}

.entry-time {
    font-size: 14px;
    color: #666;
}

.entry-mood {
    font-size: 32px;
}

.entry-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.detail-label {
    font-weight: 600;
    color: #555;
}

.detail-value {
    color: #333;
}

.entry-note {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid rgba(255, 107, 107, 0.2);
    font-style: italic;
    color: #666;
}

.delete-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(231, 76, 60, 0.9);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-button:hover {
    background: #e74c3c;
    transform: rotate(90deg) scale(1.1);
}

.no-entries {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-entries-icon {
    font-size: 64px;
    margin-bottom: 15px;
}

.no-entries-text {
    font-size: 18px;
}

/* Scrollbar styling */
.entries-list::-webkit-scrollbar {
    width: 8px;
}

.entries-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.entries-list::-webkit-scrollbar-thumb {
    background: #ff6b6b;
    border-radius: 10px;
}

.entries-list::-webkit-scrollbar-thumb:hover {
    background: #ee5a6f;
}

/* ============================================
   REPORTS PAGE STYLES
   ============================================ */
.reports-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #ff6b6b;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

.charts-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

@media (max-width: 968px) {
    .charts-container {
        grid-template-columns: 1fr;
    }
}

.chart-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.chart-card.full-width {
    grid-column: 1 / -1;
}

.chart-title {
    color: #ff6b6b;
    margin-bottom: 20px;
    font-size: 20px;
}

.no-data-message {
    background: white;
    padding: 80px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.no-data-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.no-data-message h2 {
    color: #ff6b6b;
    font-size: 28px;
    margin-bottom: 15px;
}

.no-data-message p {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
}

.back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.4);
}
