/* Bangla Sheba - Main Stylesheet */
:root {
    --primary: #1a73e8;
    --secondary: #dc3545;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    --dark: #343a40;
    --light: #f8f9fa;
    --gray: #6c757d;
    --white: #ffffff;
    --black: #000000;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.15);
    --shadow-xl: 0 12px 24px rgba(0,0,0,0.2);
    --transition: all 0.3s ease;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
}

/* Splash Screen */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.splash-content {
    text-align: center;
    color: var(--white);
}

.splash-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    animation: pulse 2s infinite;
}

.splash-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    background: var(--white);
    padding: 10px;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.splash-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.splash-tagline {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.splash-loading {
    display: inline-block;
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Header */
.header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--dark);
}

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-box {
    position: relative;
}

.search-box input {
    width: 300px;
    padding: 10px 40px 10px 15px;
    border: 2px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
}

/* Notification */
.notification-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    z-index: 2000;
}

.notification-btn {
    position: relative;
    width: 44px;
    height: 44px;
    padding: 0;
    background: none;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2002;
}

.notification-btn:hover {
    background: #f1f3f5;
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: var(--danger);
    color: var(--white);
    font-size: 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    line-height: 1;
}

.notification-panel {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 380px;
    max-width: calc(100vw - 20px);
    max-height: 500px;
    overflow-y: auto;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 2001;
}

.notification-panel.show {
    display: block;
    animation: notificationSlideDown 0.25s ease;
}

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

.notification-header {
    padding: 18px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 2;
}

.notification-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.notification-list {
    padding: 0;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s ease;
    cursor: pointer;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: #e8f4fd;
}

.notification-item.unread:hover {
    background: #d0e8f8;
}

.notification-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
    color: #333;
}

.notification-message {
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 5px;
    overflow-wrap: anywhere;
}

.notification-time {
    font-size: 11px;
    color: #999;
}

.notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--gray);
    font-size: 16px;
}

/* Side Menu */
.side-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100%;
    background: var(--white);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.side-menu.active {
    right: 0;
}

.side-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.side-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.side-menu-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
}

.side-menu-items {
    list-style: none;
    padding: 0;
}

.side-menu-items li {
    border-bottom: 1px solid #f0f0f0;
}

.side-menu-items a {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--dark);
    transition: var(--transition);
    font-weight: 500;
}

.side-menu-items a:hover {
    background: var(--light);
    padding-right: 25px;
    color: var(--primary);
}

.side-menu-items .submenu {
    padding-left: 20px;
    background: #fafafa;
}

.side-menu-items .submenu a {
    padding: 12px 20px;
    font-size: 14px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding: 80px 20px;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.hero-search {
    max-width: 600px;
    margin: 0 auto;
}

.hero-search input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
}

.hero-search button {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 20px;
    padding: 8px 20px;
    cursor: pointer;
    font-size: 16px;
}

/* Quick Services */
.quick-services {
    padding: 50px 20px;
    background: var(--white);
}

.quick-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.quick-service-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    background: var(--white);
    border: 2px solid #eee;
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--dark);
    transition: var(--transition);
    cursor: pointer;
}

.quick-service-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.quick-service-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.quick-service-name {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

/* Section */
.section {
    padding: 50px 20px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
}

.section-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* Donor Cards */
.donor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.donor-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}

.donor-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.donor-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
}

.donor-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
}

.donor-info h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.donor-blood-group {
    display: inline-block;
    background: var(--danger);
    color: var(--white);
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
}

.donor-card-body {
    padding: 20px;
}

.donor-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 14px;
}

.donor-availability {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 15px;
}

.donor-availability.available {
    background: #d4edda;
    color: #155724;
}

.donor-availability.not_available {
    background: #f8d7da;
    color: #721c24;
}

.donor-card-actions {
    display: flex;
    gap: 10px;
    padding: 0 20px 20px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: #1557b0;
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: #218838;
}

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

.btn-danger:hover {
    background: #c82333;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

/* Service Cards */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.service-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.service-thumbnail {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.service-thumbnail-placeholder {
    width: 100%;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    font-size: 48px;
}

.service-card-body {
    padding: 20px;
}

.service-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.service-card-description {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Swipe Container */
.swipe-container {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: 1200px;
    margin: 0 auto;
}

.swipe-container::-webkit-scrollbar {
    display: none;
}

.swipe-card {
    min-width: 250px;
    max-width: 250px;
    scroll-snap-align: start;
    flex-shrink: 0;
}

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

.bottom-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: var(--gray);
    font-size: 12px;
}

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

.bottom-nav-item span {
    font-size: 24px;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: var(--white);
    padding: 50px 20px 20px;
    margin-bottom: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-column h3 {
    margin-bottom: 20px;
    font-size: 20px;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: var(--transition);
}

.footer-column ul li a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #34495e;
}

/* Forms */
.form-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.form-title {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: var(--radius);
    font-size: 14px;
    transition: var(--transition);
}

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

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

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #ddd;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    height: 300px;
    border-radius: var(--radius-lg);
}

/* Responsive */
@media (max-width: 768px) {
    .header-top {
        padding: 10px 15px;
    }
    
    .logo-text {
        font-size: 1.2rem;
    }
    
    .search-box input {
        width: 200px;
    }
    
    .menu-btn {
        display: block;
    }
    
    .bottom-nav {
        display: block;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .footer {
        margin-bottom: 60px;
    }
    
    .donor-grid,
    .service-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 480px) {
    .notification-panel {
        position: fixed;
        top: 65px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
        max-height: calc(100vh - 85px);
    }

    .notification-header {
        padding: 15px;
    }

    .header-actions {
        gap: 10px;
    }
    
    .search-box input {
        width: 150px;
        font-size: 12px;
        padding: 8px 30px 8px 12px;
    }
    
    .hero {
        padding: 50px 15px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .quick-services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .quick-service-card {
        padding: 20px 10px;
    }
    
    .quick-service-icon {
        font-size: 36px;
    }
    
    .donor-grid,
    .service-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 22px;
    }
    
    .auth-buttons {
        gap: 5px;
    }
    
    .btn-login-header,
    .btn-register-header {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .user-name {
        display: none;
    }
}