/* ========== GLOBAL STYLES ========== */
:root {
    --primary: #4361ee;
    --secondary: #3a0ca3;
    --primary-light: #4895ef;
    --success: #4cc9f0;
    --danger: #f72585;
    --warning: #f8961e;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --radius: 10px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: var(--dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== BUTTONS ========== */
.btn-primary {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 10px 20px;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    text-decoration: none;
}

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

.btn-login {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 8px 20px;
    border-radius: 25px;
    text-decoration: none;
    transition: var(--transition);
}

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

.btn-signup {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 25px;
    border-radius: 25px;
    text-decoration: none;
    transition: var(--transition);
}

.btn-signup:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

/* ========== NAVBAR ========== */
.navbar {
    background: white;
    box-shadow: var(--shadow);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-brand i {
    font-size: 1.8rem;
}

.brand-name {
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-links a {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

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

/* ========== HERO SECTION ========== */
.hero {
    padding: 80px 0;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.highlight {
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: var(--success);
    opacity: 0.3;
    z-index: -1;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 30px;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
}

.stats {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

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

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray);
    margin-top: 5px;
}

.hero-image {
    display: flex;
    justify-content: center;
}

.phone-mockup {
    width: 300px;
    height: 600px;
    background: white;
    border-radius: 40px;
    padding: 20px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    border-radius: 25px;
    overflow: hidden;
}

.app-screen {
    padding: 20px;
}

.app-header {
    background: var(--primary);
    color: white;
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.pool-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.pool-info {
    flex: 1;
}

.pool-info strong {
    display: block;
    margin-bottom: 5px;
}

.pool-info small {
    color: var(--gray);
}

.join-btn {
    background: var(--success);
    color: white;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
    cursor: pointer;
}

/* ========== FEATURES SECTION ========== */
.features {
    padding: 80px 0;
    background: white;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--dark);
}

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

.feature-card {
    background: var(--light);
    padding: 30px;
    border-radius: var(--radius);
    text-align: center;
    transition: var(--transition);
}

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

.feature-icon {
    width: 70px;
    height: 70px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
}

.feature-card h3 {
    margin-bottom: 15px;
    color: var(--dark);
}

.feature-card p {
    color: var(--gray);
    line-height: 1.6;
}

/* ========== HOW IT WORKS ========== */
.how-it-works {
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.how-it-works h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
}

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

.step {
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    background: white;
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 auto 20px;
}

.step h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

/* ========== FOOTER ========== */
footer {
    background: var(--dark);
    color: white;
    padding: 60px 0 20px;
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
}

.footer-brand p {
    margin-top: 5px;
    color: var(--light-gray);
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--light-gray);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--light-gray);
    font-size: 0.9rem;
}

/* ========== DASHBOARD STYLES ========== */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: white;
    box-shadow: var(--shadow);
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.user-card {
    text-align: center;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--light-gray);
    margin-bottom: 25px;
}

.user-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 auto 15px;
}

.user-name {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.user-location {
    color: var(--gray);
    font-size: 0.9rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--dark);
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
}

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

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

.create-pool-btn {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 15px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
    margin-top: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.create-pool-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 30px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.search-bar {
    display: flex;
    gap: 10px;
}

.search-bar input {
    padding: 12px 20px;
    border: 2px solid var(--light-gray);
    border-radius: 25px;
    width: 300px;
    font-size: 1rem;
    transition: var(--transition);
}

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

.search-bar button {
    background: var(--primary);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
}

.search-bar button:hover {
    background: var(--secondary);
}

/* Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

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

.stat-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.stat-card h3 {
    font-size: 2.2rem;
    color: var(--dark);
    margin: 10px 0;
}

.stat-card p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 40px 0 20px 0;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    background: var(--light);
    border: 2px solid var(--light-gray);
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}

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

/* Pool Cards */
.pools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.pool-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--light-gray);
}

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

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

.pool-platform {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.pool-platform.blinkit {
    background: rgba(248, 180, 0, 0.1);
    color: #F8B400;
    border: 1px solid rgba(248, 180, 0, 0.3);
}

.pool-platform.zepto {
    background: rgba(255, 107, 107, 0.1);
    color: #FF6B6B;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.pool-platform.instamart {
    background: rgba(78, 205, 196, 0.1);
    color: #4ECDC4;
    border: 1px solid rgba(78, 205, 196, 0.3);
}

.pool-platform.flipkart {
    background: rgba(40, 116, 240, 0.1);
    color: #2874F0;
    border: 1px solid rgba(40, 116, 240, 0.3);
}

.pool-timer {
    background: var(--light);
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pool-timer.urgent {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.pool-creator {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pool-items {
    margin: 15px 0;
}

.item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.item-tag {
    background: var(--light);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    border: 1px solid var(--light-gray);
}

.pool-stats {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
    padding-top: 15px;
    border-top: 1px solid var(--light-gray);
    font-size: 0.9rem;
}

.pool-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pool-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-sm {
    padding: 8px 15px;
    font-size: 0.9rem;
    flex: 1;
}

/* ========== MODAL STYLES ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 0;
    width: 90%;
    max-width: 500px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.modal-header {
    padding: 20px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 30px;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== LOGIN PAGE STYLES ========== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    color: var(--primary);
    margin-bottom: 10px;
}

.login-header p {
    color: var(--gray);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

.login-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}

.forgot-password {
    color: var(--primary);
    text-decoration: none;
}

.forgot-password:hover {
    text-decoration: underline;
}

.divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
    color: var(--gray);
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: var(--light-gray);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.social-login {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
}

.btn-google, .btn-facebook {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border-radius: var(--radius);
    border: 2px solid var(--light-gray);
    background: white;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.btn-google:hover {
    background: #f8f9fa;
    border-color: #db4437;
    color: #db4437;
}

.btn-facebook:hover {
    background: #f8f9fa;
    border-color: #4267B2;
    color: #4267B2;
}

.login-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--light-gray);
    color: var(--gray);
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* ========== CREATE POOL PAGE STYLES ========== */
.create-pool-header {
    text-align: center;
    margin-bottom: 40px;
}

.create-pool-header h1 {
    color: var(--primary);
    margin-bottom: 10px;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin: 40px 0;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--light-gray);
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--light-gray);
    color: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 10px;
    transition: var(--transition);
}

.step.active .step-number {
    background: var(--primary);
    color: white;
}

.step-label {
    font-size: 0.9rem;
    color: var(--gray);
}

.step.active .step-label {
    color: var(--primary);
    font-weight: 600;
}

.step-content {
    display: none;
}

.step-content.active {
    display: block;
}

.step-description {
    color: var(--gray);
    margin-bottom: 30px;
    text-align: center;
}

.platform-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.platform-card {
    background: white;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius);
    padding: 25px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

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

.platform-card.selected {
    border-color: var(--primary);
    background: rgba(67, 97, 238, 0.05);
}

.platform-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: white;
    font-size: 1.8rem;
}

.platform-tags {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.tag {
    background: var(--light-gray);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--gray);
}

.items-container {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    margin: 30px 0;
}

.item-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.item-input-group input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 1rem;
}

.suggestions {
    margin-bottom: 25px;
}

.suggestion-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.suggestion-tags span {
    background: var(--light-gray);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.suggestion-tags span:hover {
    background: var(--primary);
    color: white;
}

.items-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    padding: 15px;
}

.item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid var(--light-gray);
}

.item-row:last-child {
    border-bottom: none;
}

.remove-btn {
    background: var(--danger);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.details-form {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    margin: 30px 0;
}

.review-card {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    margin: 30px 0;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--light-gray);
}

.platform-icon-small {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.review-section {
    margin-bottom: 25px;
}

.review-section h4 {
    color: var(--gray);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.review-content {
    background: var(--light);
    padding: 20px;
    border-radius: 8px;
}

.item-tag {
    display: inline-block;
    background: white;
    padding: 8px 15px;
    margin: 5px;
    border-radius: 20px;
    border: 1px solid var(--light-gray);
}

.review-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.review-row:last-child {
    margin-bottom: 0;
}

.savings-display {
    max-width: 300px;
    margin: 0 auto;
}

.savings-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed var(--light-gray);
}

.savings-item.total {
    border-top: 2px solid var(--primary);
    border-bottom: none;
    margin-top: 10px;
    padding-top: 15px;
    font-weight: 600;
    font-size: 1.1rem;
}

.savings-amount.total {
    color: var(--success);
    font-size: 1.2rem;
}

.step-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
}

.success-icon {
    font-size: 5rem;
    color: var(--success);
    margin-bottom: 20px;
}

/* ========== SPINNER ========== */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--light-gray);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .stats {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .dashboard-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        margin-bottom: 20px;
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    
    .pools-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pool-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .dashboard-header {
        flex-direction: column;
        text-align: center;
    }
    
    .search-bar input {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .steps {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}
/* ========== CHAT STYLES ========== */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 500px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.chat-header {
    padding: 20px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Message styles */
.chat-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
    animation: fadeIn 0.3s ease;
}

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

.my-message {
    align-self: flex-end;
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.other-message {
    align-self: flex-start;
    background: white;
    color: var(--dark);
    border: 1px solid var(--light-gray);
    border-bottom-left-radius: 4px;
}

.system-message {
    align-self: center;
    background: var(--light);
    color: var(--gray);
    border-radius: 10px;
    padding: 10px 15px;
    max-width: 90%;
    text-align: center;
    font-size: 0.9rem;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    font-size: 0.85rem;
}

.message-sender {
    font-weight: 600;
    color: var(--primary);
}

.my-message .message-sender {
    color: rgba(255, 255, 255, 0.9);
}

.message-time {
    color: var(--gray);
    font-size: 0.8rem;
}

.my-message .message-time {
    color: rgba(255, 255, 255, 0.7);
}

.message-content p {
    margin: 0;
    line-height: 1.4;
    word-wrap: break-word;
}

/* Chat input area */
.chat-input-area {
    padding: 20px;
    border-top: 1px solid var(--light-gray);
    background: white;
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.chat-input-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-input {
    padding: 12px 15px;
    border: 2px solid var(--light-gray);
    border-radius: 25px;
    font-size: 1rem;
    resize: none;
    min-height: 50px;
    max-height: 120px;
    transition: var(--transition);
}

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

.quick-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.quick-action {
    padding: 6px 12px;
    background: var(--light);
    border: 1px solid var(--light-gray);
    border-radius: 15px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.quick-action:hover {
    background: var(--primary-light);
    color: white;
    border-color: var(--primary);
}

.send-button {
    background: var(--primary);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.send-button:hover {
    background: var(--secondary);
    transform: scale(1.05);
}

/* Chat indicators */
.typing-indicator {
    padding: 10px 15px;
    background: white;
    border-radius: 15px;
    border: 1px solid var(--light-gray);
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--gray);
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: var(--gray);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-5px); }
}

/* Online status */
.online-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--gray);
}

.online-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Chat scrollbar */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive chat */
@media (max-width: 768px) {
    .chat-container {
        height: 400px;
    }
    
    .chat-message {
        max-width: 90%;
    }
    
    .chat-input-area {
        flex-direction: column;
        gap: 15px;
    }
    
    .send-button {
        align-self: flex-end;
    }
}
/* ========== CHAT MESSAGES FIX ========== */
#chatMessages {
    display: flex;
    flex-direction: column !important;
    gap: 15px;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
    height: 100%;
}

.chat-system-message {
    text-align: center;
    padding: 10px 15px;
    background: var(--light);
    border-radius: 10px;
    color: var(--gray);
    font-size: 0.9rem;
    max-width: 80%;
    margin: 10px auto !important;
    align-self: center !important;
}

.chat-message {
    max-width: 70%;
    margin: 0 !important;
    align-self: flex-start !important;
}

.my-message {
    align-self: flex-end !important;
    background: var(--primary);
    color: white;
    border-radius: 18px 18px 4px 18px;
    padding: 10px 15px;
    margin-left: auto !important;
}

.other-message {
    align-self: flex-start !important;
    background: white;
    border: 1px solid var(--light-gray);
    border-radius: 18px 18px 18px 4px;
    padding: 10px 15px;
    margin-right: auto !important;
}

/* Force vertical layout */
#chatMessages > * {
    display: block !important;
    width: fit-content !important;
    max-width: 70% !important;
    margin-bottom: 15px !important;
}

/* Modal body fix */
.modal-body {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    padding: 0 !important;
}
/* ========== POOL DETAIL STYLES ========== */
.pool-detail-section {
    margin-top: 40px;
    animation: slideUp 0.3s ease;
}

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

.pool-detail-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.detail-header {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-detail-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.close-detail-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.detail-content {
    padding: 30px;
}

.detail-info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.info-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: white;
    font-size: 1.5rem;
}

.info-card h4 {
    margin: 0 0 5px 0;
    color: var(--gray);
    font-size: 0.9rem;
    text-align: center;
}

.info-card p {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    color: var(--dark);
}

.detail-section {
    margin: 30px 0;
    padding: 20px;
    background: var(--light);
    border-radius: var(--radius);
}

.detail-section h3 {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--dark);
}

.members-list {
    margin-top: 15px;
}

.member-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: var(--radius);
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.member-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
}

.member-info {
    flex: 1;
}

.member-info strong {
    display: block;
    margin-bottom: 3px;
}

.member-info small {
    color: var(--gray);
    font-size: 0.85rem;
}

.member-status {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(76, 201, 240, 0.1);
    color: var(--success);
}

.detail-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn-chat {
    background: #4cc9f0;
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-chat:hover {
    background: #0db8e6;
    transform: translateY(-2px);
}

.btn-lg {
    padding: 15px 30px;
    font-size: 1.1rem;
}

/* Toast notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: var(--radius);
    padding: 15px 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 9999;
    animation: slideInRight 0.3s ease;
    max-width: 350px;
}

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

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-error {
    border-left: 4px solid var(--danger);
}

.toast-info {
    border-left: 4px solid var(--primary);
}

.toast i {
    font-size: 1.2rem;
}

.toast-success i {
    color: var(--success);
}

.toast-error i {
    color: var(--danger);
}

.toast-info i {
    color: var(--primary);
}

.toast button {
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    margin-left: auto;
    font-size: 1.2rem;
}

/* Chat preview button */
.chat-preview-btn {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 6px 15px;
    border-radius: 15px;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

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

/* Responsive design for pool detail */
@media (max-width: 768px) {
    .detail-info-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .detail-actions {
        flex-direction: column;
    }
    
    .detail-actions button {
        width: 100%;
    }
}
