/* ===================================
   Global Styles & Reset
   =================================== */

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

:root {
    --primary-color: #4CAF50;
    --secondary-color: #2196F3;
    --accent-color: #FF9800;
    --danger-color: #F44336;
    --success-color: #4CAF50;
    --text-dark: #212121;
    --text-light: #757575;
    --bg-light: #F5F5F5;
    --bg-white: #FFFFFF;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.15);
}

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

/* ===================================
   Loading Screen
   =================================== */

.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading p {
    margin-top: 20px;
    font-size: 18px;
    font-weight: 600;
}

/* ===================================
   App Container
   =================================== */

.app-container {
    max-width: 480px;
    margin: 0 auto;
    background: var(--bg-white);
    min-height: 100vh;
    position: relative;
    padding-bottom: 80px;
}

/* ===================================
   Header
   =================================== */

.header {
    background: linear-gradient(135deg, var(--primary-color), #45a049);
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.logo-icon {
    font-size: 32px;
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.header h1 {
    font-size: 24px;
    font-weight: 700;
}

.tagline {
    font-size: 14px;
    opacity: 0.9;
    margin-top: 5px;
}

/* ===================================
   Bottom Navigation
   =================================== */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    max-width: 480px;
    width: 100%;
    background: var(--bg-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-btn {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
    padding: 5px 15px;
    flex: 1;
}

.nav-btn i {
    font-size: 20px;
}

.nav-btn span {
    font-size: 11px;
    font-weight: 500;
}

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

.nav-btn:hover {
    color: var(--primary-color);
}

/* ===================================
   Main Content & Screens
   =================================== */

.main-content {
    padding: 20px;
}

.screen {
    display: none;
    animation: fadeIn 0.3s;
}

.screen.active {
    display: block;
}

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

.screen h2 {
    font-size: 22px;
    margin-bottom: 20px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ===================================
   Home Screen
   =================================== */

.welcome-card {
    background: linear-gradient(135deg, var(--primary-color), #45a049);
    color: white;
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: var(--shadow-lg);
}

.welcome-card h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: white;
    justify-content: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: var(--bg-white);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card i {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-card h3 {
    font-size: 28px;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.stat-card p {
    font-size: 13px;
    color: var(--text-light);
}

.quick-actions h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.action-card {
    background: var(--bg-white);
    border: 2px solid var(--bg-light);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.action-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.action-card i {
    font-size: 28px;
    color: var(--primary-color);
}

.action-card span {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
}

.info-banner {
    background: var(--secondary-color);
    color: white;
    padding: 15px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.info-banner i {
    font-size: 20px;
}

/* ===================================
   Map Screen
   =================================== */

.map-placeholder {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    height: 250px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.map-placeholder i {
    font-size: 48px;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.collection-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.collection-item {
    background: var(--bg-white);
    padding: 15px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
}

.collection-item h3 {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.collection-item p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.collection-item .status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
}

.status.active {
    background: #e8f5e9;
    color: var(--success-color);
}

.capacity-bar {
    margin-top: 10px;
}

.capacity-bar-fill {
    height: 6px;
    background: var(--bg-light);
    border-radius: 3px;
    overflow: hidden;
}

.capacity-bar-progress {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s;
}

.capacity-text {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 5px;
}

.call-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    margin-top: 10px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s;
}

.call-btn:hover {
    background: #1976D2;
}

/* ===================================
   Pickup Form
   =================================== */

.pickup-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group label i {
    color: var(--primary-color);
}

.form-group input,
.form-group textarea {
    padding: 12px;
    border: 2px solid var(--bg-light);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.submit-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.3s;
    margin-top: 10px;
}

.submit-btn:hover {
    background: #45a049;
}

.success-message {
    background: #e8f5e9;
    border: 2px solid var(--success-color);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    margin-top: 20px;
}

.success-message i {
    font-size: 48px;
    color: var(--success-color);
    margin-bottom: 15px;
}

.success-message h3 {
    color: var(--success-color);
    margin-bottom: 10px;
}

/* ===================================
   Education Screen
   =================================== */

.education-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.education-item {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.education-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.education-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
}

.education-content {
    padding: 15px;
}

.education-content h3 {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.education-content p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.5;
}

.education-category {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 10px;
}

/* ===================================
   Profile Screen
   =================================== */

.profile-card {
    background: linear-gradient(135deg, var(--primary-color), #45a049);
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: var(--shadow-lg);
}

.profile-avatar {
    font-size: 64px;
    margin-bottom: 15px;
}

.profile-card h3 {
    font-size: 22px;
    margin-bottom: 5px;
}

.profile-card p {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 3px;
}

.profile-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.profile-stat {
    background: var(--bg-white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-stat i {
    font-size: 32px;
    color: var(--primary-color);
}

.profile-stat h4 {
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 3px;
}

.profile-stat p {
    font-size: 12px;
    color: var(--text-light);
}

.my-requests h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.request-item {
    background: var(--bg-white);
    padding: 15px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 15px;
    border-left: 4px solid var(--secondary-color);
}

.request-item h4 {
    font-size: 15px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.request-item p {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 5px;
}

.request-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
}

.request-status.pending {
    background: #fff3e0;
    color: var(--accent-color);
}

.request-status.completed {
    background: #e8f5e9;
    color: var(--success-color);
}

/* ===================================
   Toast Notification
   =================================== */

.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-dark);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s;
    max-width: 90%;
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 480px) {
    .header h1 {
        font-size: 20px;
    }
    
    .action-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   Utility Classes
   =================================== */

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}