/* W3Schools Style: Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    height: 100vh;
    background: linear-gradient(135deg, #110c16 0%, #7f00ff 100%);
    overflow: hidden;
    position: relative;
}

/* Background Animations - SHARED ACROSS ALL SCREENS */
.bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    top: -10%;
    border-radius: 50%;
    pointer-events: none;
    animation: floatUp linear infinite;
    will-change: transform;
}

@keyframes floatUp {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    animation: floatShape 20s infinite ease-in-out;
}

.shape1 { width: 100px; height: 100px; top: 10%; left: 10%; animation-delay: 0s; }
.shape2 { width: 150px; height: 150px; top: 60%; right: 10%; animation-delay: 5s; }
.shape3 { width: 80px; height: 80px; bottom: 20%; left: 20%; animation-delay: 10s; }

@keyframes floatShape {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-50px) scale(1.1); }
}

/* Main Container */
.main-container {
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

/* Screen Management */
.screen {
    display: none;
    min-height: 100vh;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.screen.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Login Screen */
.container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 40px 30px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    animation: slideIn 0.8s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.logo-section {
    text-align: center;
    margin-bottom: 30px;
}

.logo-text {
    color: white;
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 5px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.logo-subtitle {
    color: rgba(255,255,255,0.8);
    font-size: 1rem;
}

.input-group {
    position: relative;
    margin-bottom: 25px;
}

.input-group input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
}

.input-group input::placeholder {
    color: rgba(255,255,255,0.6);
}

.input-group input:focus {
    outline: none;
    border-color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.2);
    box-shadow: 0 0 15px rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.7);
    font-size: 18px;
}

.btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #bebec3, #3406a7);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(25, 22, 35, 0.4);
}

.form-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.link {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.link:hover {
    color: white;
}

/* Dashboard Screen */
.dashboard-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    width: 100%;
    position: relative;
}

.logout-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.logout-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

.success-message {
    background: rgba(46, 204, 113, 0.9);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    animation: slideIn 0.5s ease;
    font-size: 1.1rem;
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.3);
}

.dashboard-header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.dashboard-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 300;
    letter-spacing: 1px;
}

.dashboard-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 800px;
    width: 100%;
}

.option-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.2);
}

.option-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.2);
}

.option-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.option-card h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #333;
}

.option-card p {
    color: #666;
    line-height: 1.6;
    font-size: 1rem;
}

/* Responsive Design */
@media screen and (max-width: 600px) {
    .login-card {
        margin: 20px;
        padding: 30px 20px;
    }
    
    .logo-text {
        font-size: 2rem;
    }
    
    .container {
        padding: 10px;
    }
    
    .dashboard-container {
        padding: 10px;
    }
    
    .dashboard-header h1 {
        font-size: 2rem;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .option-card {
        padding: 30px 20px;
    }
    
    .logout-btn {
        top: 10px;
        right: 10px;
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media screen and (max-width: 480px) {
    .logo-text {
        font-size: 1.8rem;
    }
    
    .dashboard-header h1 {
        font-size: 1.8rem;
    }
}

/* Budget Screen Specifics */
.category-input {
    width: 100%;
}

#remainingDisplay {
    font-size: 2rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.negative-balance {
    color: #ff4757 !important;
}

.positive-balance {
    color: #2ecc71 !important;
}

/* Chrome, Safari, Edge, Opera - Remove arrows from number inputs */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Calendar Specifics */
.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    color: rgba(255,255,255,0.8);
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 15px 5px;
    text-align: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.calendar-day:hover, .calendar-day.active-day {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.calendar-day.empty {
    background: transparent;
    border: none;
    cursor: default;
}

.calendar-day.empty:hover {
    transform: none;
    box-shadow: none;
    background: transparent;
}

.expense-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.2);
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.delete-btn {
    color: #ff4757;
    cursor: pointer;
    transition: color 0.3s ease;
}

.delete-btn:hover {
    color: #ff6b81;
}

/* Scrollbar styling for the expense list */
#dailyExpenseList::-webkit-scrollbar {
    width: 6px;
}
#dailyExpenseList::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
}

/* 1. Re-lock the main body to keep the front page and background perfect */
html, body {
    height: 100%;
    margin: 0;
    overflow: hidden; 
}

/* 2. Make only the screens scrollable */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow-y: auto; /* Enable scrolling only inside the screen */
    padding: 20px;
    z-index: 2; /* Sits above the background animation */
    -webkit-overflow-scrolling: touch;
}

/* 3. Ensure the dashboard container doesn't cut off */
.dashboard-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: min-content; /* Allows it to grow with content */
    padding-bottom: 100px; /* Extra space at the bottom for comfortable scrolling */
}

/* 4. Optional: Styled scrollbar for the screens */
.screen::-webkit-scrollbar {
    width: 8px;
}
.screen::-webkit-scrollbar-track {
    background: transparent;
}
.screen::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

/* --- DISCLAIMER MODAL STYLES --- */

/* The subtle text button on the login screen */
.disclaimer-btn {
    background: none;
    border: none;
    color: #a29bfe; /* Matches your particle theme */
    text-decoration: underline;
    cursor: pointer;
    margin-top: 15px;
    font-size: 0.9rem;
}

/* The dark background overlay */
.modal-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8); /* 80% dark background */
    z-index: 1000; /* Ensures it sits on top of everything else */
    justify-content: center;
    align-items: center;
}

/* The actual pop-up box */
.modal-content {
    background: #1e272e; /* Dark theme box */
    color: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    border: 1px solid #3b82f6;
}

.modal-content h2 {
    margin-top: 0;
    color: #f59e0b; /* Warning Orange */
}

/* The acknowledge button */
.close-modal-btn {
    background: #10b981; /* Success Green */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    margin-top: 20px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.close-modal-btn:hover {
    background: #059669;
}

/* --- CREDITS LIST STYLES --- */
.credits-list {
    list-style: none; /* Removes the default bullet points */
    padding: 0;
    margin: 20px 0;
    text-align: left;
    background: rgba(255, 255, 255, 0.05); /* Slight highlight box */
    border-radius: 8px;
    padding: 15px;
}

.credits-list li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #d1d5db; /* Light grey text */
    font-size: 0.95rem;
}

/* Removes the line under the last name */
.credits-list li:last-child {
    border-bottom: none;
}

.credits-list strong {
    color: #ffffff; /* Makes the names pop out in bright white */
    display: inline-block;
    min-width: 140px; /* Aligns the roles neatly in a column */
}
