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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    padding-bottom: 70px;
}

/* Login */
.login-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}

.login-box {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    color: #27ae60;
    margin-bottom: 30px;
    text-align: center;
}

.input-group {
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #2ecc71;
}

.btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-green {
    background: #2ecc71;
    color: white;
}

.btn-green:hover {
    background: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.3);
}

.btn-white {
    background: white;
    color: #2ecc71;
    border: 2px solid #2ecc71;
}

.btn-white:hover {
    background: #f0f0f0;
}

.btn:disabled,
.btn.disabled {
    background: #95a5a6;
    color: #ecf0f1;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn:disabled:hover,
.btn.disabled:hover {
    background: #95a5a6;
    transform: none;
    box-shadow: none;
}

/* Register/Login Link */
.register-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.register-link a {
    color: #2ecc71;
    text-decoration: none;
    font-weight: bold;
}

.register-link a:hover {
    text-decoration: underline;
}

/* Error Message */
.error-message {
    display: none;
    background: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 14px;
    text-align: center;
}

/* App Container */
.app-container {
    display: none;
    max-width: 600px;
    margin: 0 auto;
}

.app-container.active {
    display: block;
}

/* Home Page */
.home-page {
    padding: 40px 20px;
    text-align: center;
}

.counter-container {
    background: white;
    padding: 40px 20px;
    border-radius: 20px;
    margin: 20px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.counter {
    font-size: 48px;
    font-weight: bold;
    color: #27ae60;
    margin: 20px 0;
}

.counter-label {
    font-size: 24px;
    color: #555;
    margin-bottom: 10px;
}

.symptom-title {
    font-size: 18px;
    color: #27ae60;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 8px;
}

.symptom-label {
    font-size: 22px;
    color: black;
    font-weight: bold;
    margin-bottom: 10px;
}

.motivational-phrase {
    font-size: 18px;
    color: #777;
    font-style: italic;
    margin-top: 10px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
}

/* Calendar */
.calendar-page {
    padding: 20px;
    display: none;
}

.calendar-page.active {
    display: block;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: white;
    padding: 15px;
    border-radius: 10px;
}

.calendar-header button {
    background: #2ecc71;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    background: white;
    padding: 15px;
    border-radius: 10px;
}

.calendar-day-header {
    text-align: center;
    font-weight: bold;
    color: #2ecc71;
    padding: 10px 5px;
    font-size: 12px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    position: relative;
    font-size: 14px;
    gap: 2px;
}

.calendar-day:hover {
    background: #f0f0f0;
}

.calendar-day.relapse {
    background: #ffebee;
    color: #c62828;
    font-weight: bold;
}

.calendar-day.relapse::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background: #2ecc71;
    border-radius: 50%;
}

.calendar-day.start-date {
    background: #e8f5e9;
    color: #2e7d32;
    font-weight: bold;
}

.calendar-day.empty {
    background: transparent;
    border: none;
    cursor: default;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.modal-content h3 {
    margin-bottom: 20px;
    color: #333;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-buttons button {
    flex: 1;
}

/* Forum */
.forum-page {
    padding: 20px;
    display: none;
}

.forum-page.active {
    display: block;
}

.create-topic-btn {
    width: 100%;
    margin-bottom: 20px;
}

.topic-form {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: none;
}

.topic-form.active {
    display: block;
}

.topic-form input,
.topic-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-family: inherit;
}

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

.topic-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.topic-item:hover {
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.topic-title {
    font-weight: bold;
    color: #2ecc71;
    margin-bottom: 5px;
}

.topic-content {
    color: #666;
    font-size: 14px;
}

.topic-meta {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
}

.topic-detail {
    background: white;
    padding: 20px;
    border-radius: 10px;
    display: none;
}

.topic-detail.active {
    display: block;
}

.comment-form {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.comment-form textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    margin-top: 15px;
    margin-bottom: 15px;
    transition: border 0.3s;
}

.comment-form textarea:focus {
    outline: none;
    border-color: #2ecc71;
}

.comment-item {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
}

.comment-author {
    font-weight: bold;
    color: #2ecc71;
    font-size: 14px;
}

.comment-text {
    margin-top: 5px;
    font-size: 14px;
}

/* Profile */
.profile-page {
    padding: 40px 20px;
    display: none;
}

.profile-page.active {
    display: block;
}

.profile-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.profile-avatar {
    width: 100px;
    height: 100px;
    background: #2ecc71;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
}

.profile-name {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 30px;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 100;
}

.nav-item {
    flex: 1;
    text-align: center;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    background: transparent;
    color: #999;
}

.nav-item.active {
    color: #2ecc71;
}

.nav-item:hover {
    background: #f5f5f5;
}

.nav-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.nav-label {
    font-size: 12px;
}

.back-btn {
    background: white;
    color: #2ecc71;
    border: 2px solid #2ecc71;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 20px;
}

/* Inspiration Box */
.inspiration-box {
    background: white;
    padding: 20px;
    border-radius: 20px;
    margin-top: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.inspiration-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.inspiration-header h3 {
    color: #333;
    font-size: 18px;
    margin: 0;
}

.btn-edit {
    background: #2ecc71;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-edit:hover {
    background: #27ae60;
    transform: translateY(-1px);
}

.inspiration-content {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 10px;
    min-height: 100px;
}

.inspiration-content p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.inspiration-edit textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: border 0.3s;
}

.inspiration-edit textarea:focus {
    outline: none;
    border-color: #2ecc71;
}

.edit-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.edit-buttons button {
    flex: 1;
}

/* Inspo Page */
.inspo-page {
    padding: 20px;
    display: none;
    max-width: 600px;
    margin: 0 auto;
}

.inspo-page.active {
    display: block;
}

.inspo-title {
    color: #2ecc71;
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
}

.user-inspiration {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    text-align: center;
    font-style: italic;
}

.quote-image-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    min-height: 400px;
    background: #f0f0f0;
}

.daily-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    min-height: 400px;
}

.quote-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #333;
    width: 90%;
    padding: 20px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.quote-text {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 15px;
    color: #333;
}

.quote-author {
    font-size: 16px;
    color: #555;
    font-style: italic;
    margin: 0;
}
