/* ==========================================
   1. RESET & BASE STYLES
   ========================================== */
* {
    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;
    display: flex;
    flex-direction: column; /* Isse navbar top par aur content niche perfectly set ho jayega */
}

/* ==========================================
   2. SIGNUP / SIGNIN FORMS STYLES
   ========================================== */
/* Login/Signup forms ko page ke center me lane ke liye container helper wrapper */
body:has(.signup-container) {
    justify-content: center;
    align-items: center;
}

.signup-container {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 420px;
    margin: auto; /* Forms ko vertical/horizontal automatic center rakhta hai */
}

.signup-header {
    text-align: center;
    margin-bottom: 30px;
}

.signup-header h2 {
    color: #333333;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.signup-header p {
    color: #666666;
    font-size: 14px;
}

.signup-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 14px;
    color: #444444;
    font-weight: 600;
}

.input-group input {
    padding: 12px 16px;
    border: 1px solid #cccccc;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
    outline: none;
}

.input-group input:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

.signup-btn {
    background-color: #4a90e2;
    color: white;
    padding: 14px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.signup-btn:hover {
    background-color: #357abd;
}

.signup-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: #666666;
}

.signup-footer a {
    color: #4a90e2;
    text-decoration: none;
    font-weight: 600;
}

.signup-footer a:hover {
    text-decoration: underline;
}

/* ==========================================
   3. FIXED NAVBAR STYLES
   ========================================== */
.navbar {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0 20px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    font-size: 22px;
    font-weight: 700;
    color: #4a90e2;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #555555;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 6px;
}

.nav-links a:hover, 
.nav-links a.active {
    color: #4a90e2;
    background-color: rgba(74, 144, 226, 0.08);
}

.nav-links a.logout-link {
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.nav-links a.logout-link:hover {
    background-color: #e74c3c;
    color: #ffffff;
}

/* ==========================================
   4. DASHBOARD CONTENT GRID
   ========================================== */
.dashboard-wrapper {
    max-width: 1200px;
    margin: 100px auto 40px auto; /* Navbar se spacing dene ke liye */
    padding: 0 20px;
    width: 100%;
}

.welcome-box {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    margin-bottom: 30px;
    border: 1px solid #eaeaea;
}

.welcome-box h1 {
    color: #333;
    font-size: 28px;
    margin-bottom: 8px;
}

.welcome-box p {
    color: #666;
    font-size: 15px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.feature-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid #eaeaea;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.card-header h3 {
    color: #333;
    font-size: 19px;
    font-weight: 700;
}

/* Badges styling */
.badge {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
}
.badge.public { background: #e3f2fd; color: #0d47a1; }
.badge.mixed { background: #f3e5f5; color: #4a148c; }
.badge.actions { background: #e8f5e9; color: #1b5e20; }
.badge.friends { background: #fff3e0; color: #e65100; }
.badge.live { background: #ffebee; color: #b71c1c; }

.feature-card p {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Preview Actions styling for contacts card */
.card-actions-preview {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.card-actions-preview span {
    font-size: 11px;
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
    color: #555;
    border: 1px solid #e0e0e0;
}

/* Card Buttons */
.card-btn {
    display: block;
    text-align: center;
    background-color: #f5f7fa;
    color: #4a90e2;
    text-decoration: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid #4a90e2;
    transition: all 0.3s ease;
}

.card-btn:hover {
    background-color: #4a90e2;
    color: white;
}

.card-btn.live-btn {
    background-color: #4a90e2;
    color: white;
    border: none;
}

.card-btn.live-btn:hover {
    background-color: #357abd;
}

/* ==========================================
   5. MODALS & RESPONSIVENESS
   ========================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.modal-content {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 350px;
    text-align: center;
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
        gap: 15px;
    }
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    .dashboard-wrapper {
        margin-top: 180px;
    }
}
/* 📱 GLOBAL MOBILE RESPONSIVE FIX FOR NAVBAR OVERLAP */
@media (max-width: 768px) {
    /* Navbar ko mobile par static ya normal behave karwane ke liye */
    .navbar {
        position: relative !important; /* Fixed se hata kar normal space di */
        height: auto !important;
        padding: 15px 10px !important;
    }

    .nav-container {
        flex-direction: column !important;
        gap: 12px !important;
        align-items: center !important;
        text-align: center !important;
    }

    .nav-links {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 8px !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .nav-links a {
        padding: 6px 10px !important;
        font-size: 13px !important;
    }

    /* Saare pages ke content wrapper ki extra top padding khatam ki kyunki ab nav jagah gheregi */
    .dashboard-wrapper, 
    .container, 
    .wrapper,
    div[style*="padding: 100px"], 
    div[style*="padding-top: 100px"] {
        padding-top: 20px !important; /* Content safely normal gap se start hoga */
        margin-top: 0 !important;
    }
}