/* Color Palette from Logo */
:root {
    --primary-teal: #2D9B8B;
    --primary-green: #4CAF50;
    --primary-blue: #4A90E2;
    --secondary-blue: #6BB6FF;
    --accent-teal: #26A69A;
    --light-teal: #E0F2F1;
    --light-blue: #E3F2FD;
    --white: #FFFFFF;
    --light-gray: #F8F9FA;
    --medium-gray: #E9ECEF;
    --dark-gray: #6C757D;
    --text-dark: #212529;
    --text-light: #6C757D;
    --success: #28A745;
    --warning: #FFC107;
    --danger: #DC3545;
    --shadow: rgba(45, 155, 139, 0.1);
    --shadow-hover: rgba(45, 155, 139, 0.2);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--light-gray);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.app-container {
    max-width: 414px;
    margin: 0 auto;
    background: var(--white);
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* Header Styles */
.app-header {
    background: linear-gradient(135deg, var(--primary-teal) 0%, var(--primary-blue) 100%);
    color: var(--white);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.notification-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notification-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--danger);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Content */
.main-content {
    padding-bottom: 90px;
    min-height: calc(100vh - 80px);
}

.page {
    display: none;
    padding: 1.5rem;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-light);
    font-size: 1rem;
}

/* Quick Actions */
.quick-actions {
    margin-bottom: 2rem;
}

.quick-action-card {
    background: linear-gradient(135deg, var(--danger) 0%, #FF6B6B 100%);
    color: var(--white);
    padding: 1.5rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 20px rgba(220, 53, 69, 0.2);
}

.quick-action-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.quick-action-content {
    flex: 1;
}

.quick-action-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.quick-action-content p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.quick-donate-btn {
    background: var(--white);
    color: var(--danger);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-donate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
}

.see-all-btn {
    background: none;
    border: none;
    color: var(--primary-teal);
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.see-all-btn:hover {
    background: var(--light-teal);
}

/* Donation Cards */
.donation-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.donation-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.donation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-hover);
}

.card-image {
    position: relative;
    height: 160px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.donation-card:hover .card-image img {
    transform: scale(1.05);
}

.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--danger);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.card-content {
    padding: 1.25rem;
}

.card-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.card-content p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.min-amount {
    color: var(--primary-teal);
    font-weight: 600;
    font-size: 0.9rem;
}

.donors {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Project Cards */
.project-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.project-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px var(--shadow);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-hover);
}

.project-image {
    height: 140px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-content {
    padding: 1.25rem;
}

.project-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.project-content p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.progress-section {
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--medium-gray);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-teal) 0%, var(--primary-green) 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.raised {
    color: var(--primary-teal);
    font-weight: 600;
    font-size: 0.9rem;
}

.goal {
    color: var(--text-light);
    font-size: 0.9rem;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--medium-gray);
}

.days-left {
    color: var(--warning);
    font-weight: 500;
    font-size: 0.85rem;
}

.supporters {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.category-tab {
    background: var(--medium-gray);
    color: var(--text-light);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.category-tab.active {
    background: var(--primary-teal);
    color: var(--white);
}

.category-tab:hover:not(.active) {
    background: var(--light-teal);
    color: var(--primary-teal);
}

/* Donation Items */
.donation-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.donation-item {
    background: var(--white);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 2px 12px var(--shadow);
    display: flex;
    gap: 1rem;
    align-items: center;
    transition: all 0.3s ease;
}

.donation-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--shadow-hover);
}

.item-image {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-content {
    flex: 1;
}

.item-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.item-content p {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.item-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.amount-input {
    display: flex;
    align-items: center;
    background: var(--light-gray);
    border-radius: 12px;
    padding: 0.5rem 0.75rem;
    gap: 0.25rem;
}

.currency {
    color: var(--text-light);
    font-weight: 500;
}

.amount-field {
    border: none;
    background: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    width: 60px;
    outline: none;
}

.add-to-cart-btn {
    width: 40px;
    height: 40px;
    background: var(--primary-teal);
    color: var(--white);
    border: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-to-cart-btn:hover {
    background: var(--accent-teal);
    transform: translateY(-1px);
}

/* Cart Styles */
.cart-items {
    margin-bottom: 2rem;
}

.cart-item {
    background: var(--white);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 12px var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.item-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.item-info img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
}

.item-details h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.item-details p {
    color: var(--text-light);
    font-size: 0.85rem;
}

.item-amount {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-teal);
}

.remove-item-btn {
    width: 36px;
    height: 36px;
    background: var(--light-gray);
    color: var(--text-light);
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-item-btn:hover {
    background: var(--danger);
    color: var(--white);
}

/* Donation Options */
.donation-options {
    margin-bottom: 2rem;
}

.option-card {
    background: var(--white);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 2px 12px var(--shadow);
    margin-bottom: 1rem;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-dark);
}

.option-checkbox {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--medium-gray);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.option-checkbox:checked + .checkmark {
    background: var(--primary-teal);
    border-color: var(--primary-teal);
}

.option-checkbox:checked + .checkmark::after {
    content: '✓';
    color: var(--white);
    font-size: 0.8rem;
    font-weight: bold;
}

.behalf-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--medium-gray);
}

.form-group {
    margin-bottom: 1rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--medium-gray);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.2s ease;
    outline: none;
}

.form-input:focus {
    border-color: var(--primary-teal);
    box-shadow: 0 0 0 3px rgba(45, 155, 139, 0.1);
}

/* Cart Summary */
.cart-summary {
    background: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px var(--shadow);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.summary-row.total {
    padding-top: 0.75rem;
    border-top: 1px solid var(--medium-gray);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.proceed-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-teal) 0%, var(--primary-blue) 100%);
    color: var(--white);
    border: none;
    padding: 1rem;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.proceed-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-hover);
}

/* Profile Styles */
.profile-section {
    margin-bottom: 2rem;
}

.user-info {
    background: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-teal) 0%, var(--primary-blue) 100%);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.user-details {
    flex: 1;
}

.user-details h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.user-details p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.edit-profile-btn {
    width: 40px;
    height: 40px;
    background: var(--light-teal);
    color: var(--primary-teal);
    border: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.edit-profile-btn:hover {
    background: var(--primary-teal);
    color: var(--white);
}

.auth-section {
    display: flex;
    gap: 1rem;
}

.auth-btn {
    flex: 1;
    padding: 1rem;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-btn.primary {
    background: var(--primary-teal);
    color: var(--white);
    border: none;
}

.auth-btn.secondary {
    background: var(--white);
    color: var(--primary-teal);
    border: 2px solid var(--primary-teal);
}

.auth-btn:hover {
    transform: translateY(-1px);
}

/* Profile Menu */
.profile-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.menu-item {
    background: var(--white);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 2px 12px var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--shadow-hover);
}

.menu-icon {
    width: 45px;
    height: 45px;
    background: var(--light-teal);
    color: var(--primary-teal);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.menu-content {
    flex: 1;
}

.menu-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.menu-content p {
    color: var(--text-light);
    font-size: 0.85rem;
}

.menu-item > .fas.fa-chevron-right {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 414px;
    background: var(--white);
    border-top: 1px solid var(--medium-gray);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0.75rem 1rem;
    box-shadow: 0 -2px 20px var(--shadow);
    z-index: 1000;
}

.nav-item {
    background: none;
    border: none;
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0.5rem;
    border-radius: 12px;
    position: relative;
    min-width: 60px;
}

.nav-item:not(.donate-main):hover {
    background: var(--light-teal);
    color: var(--primary-teal);
}

.nav-item.active {
    color: var(--primary-teal);
}

.nav-item i {
    font-size: 1.2rem;
}

.nav-item span {
    font-size: 0.7rem;
    font-weight: 500;
}

.nav-item.donate-main {
    background: linear-gradient(135deg, var(--primary-teal) 0%, var(--primary-blue) 100%);
    color: var(--white);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    margin-top: -20px;
    box-shadow: 0 4px 20px var(--shadow-hover);
}

.nav-item.donate-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-hover);
}

.donate-icon {
    font-size: 1.5rem;
}

.cart-badge {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: var(--danger);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 375px) {
    .app-container {
        max-width: 100%;
    }
    
    .page {
        padding: 1rem;
    }
    
    .donation-item {
        flex-direction: column;
        text-align: center;
    }
    
    .item-actions {
        justify-content: center;
    }
    
    .quick-action-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .cart-item {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .item-info {
        flex: 1;
        min-width: 200px;
    }
}

@media (max-width: 320px) {
    .header-content {
        padding: 0.5rem 0;
    }
    
    .logo-text {
        font-size: 1.1rem;
    }
    
    .category-tabs {
        gap: 0.25rem;
    }
    
    .category-tab {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .bottom-nav {
        padding: 0.5rem;
    }
    
    .nav-item {
        min-width: 50px;
    }
    
    .nav-item span {
        font-size: 0.65rem;
    }
}

/* Enhanced Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Apply animations to elements */
.donation-card {
    animation: slideInUp 0.6s ease forwards;
}

.donation-card:nth-child(1) { animation-delay: 0.1s; }
.donation-card:nth-child(2) { animation-delay: 0.2s; }
.donation-card:nth-child(3) { animation-delay: 0.3s; }

.project-card {
    animation: slideInLeft 0.6s ease forwards;
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }

.donation-item {
    animation: slideInRight