@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #7B2CBF;
    --primary-hover: #9D4EDD;
    --secondary-color: #FF6B6B;
    --bg-color: #F8F9FA;
    --surface-color: #FFFFFF;
    --text-primary: #212529;
    --text-secondary: #6C757D;
    --border-color: #DEE2E6;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-md: 12px;
    --radius-full: 9999px;
}

/* Skeleton Loading Animation */
.skeleton {
    background: #e1e1e1;
    background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
    border-radius: 5px;
    background-size: 200% 100%;
    animation: 1.5s shine linear infinite;
}

.skeleton-text {
    height: 12px;
    margin-bottom: 10px;
    width: 100%;
}

@keyframes shine {
    to {
        background-position-x: -200%;
    }
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

/* Authentication Page Styles */
.auth-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('../images/login_bg.png');
    background-size: cover;
    background-position: center;
    position: relative;
    padding: 20px;
}

/* Dark overlay to make text more readable */
.auth-container::before {
    content: '';
    position: absolute;
    top:0; left:0; right:0; bottom:0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    z-index: 1;
}

.auth-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    text-align: center;
    max-width: 400px;
    width: 100%;
    z-index: 2;
    animation: fadeIn 0.5s ease-out;
}

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

.auth-logo {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.auth-subtitle {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.google-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
}

.google-btn img {
    width: 24px;
    height: 24px;
}

.google-btn:hover {
    box-shadow: var(--shadow-md);
    background: var(--bg-color);
    transform: translateY(-2px);
}

/* Common UI Elements */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Base App Layout */
.app-header {
    background: var(--surface-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

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

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

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
    background: rgba(123, 44, 191, 0.1);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&display=swap');

/* Dashboard Layout */
.feed-layout {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    gap: 30px;
    padding: 20px;
    justify-content: center;
}

.feed-main {
    flex: 1;
    max-width: 750px;
    min-width: 0;
}

.feed-side {
    width: 320px;
    flex-shrink: 0;
}

@media (max-width: 1000px) {
    .feed-layout { flex-direction: column; align-items: center; }
    .feed-main { width: 100%; max-width: 800px; }
    .feed-side { display: none; }
}

/* Floating Tabs */
.matrimony-side-tab, .greeting-side-tab {
    position: fixed;
    right: 0;
    color: white;
    padding: 20px 10px;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    cursor: pointer;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    z-index: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.matrimony-side-tab { top: 38%; background: var(--primary-color); }
.greeting-side-tab { top: 58%; background: #F5576C; }

.matrimony-side-tab:hover, .greeting-side-tab:hover {
    padding-right: 20px;
}

.matrimony-side-tab ion-icon, .greeting-side-tab ion-icon {
    transform: rotate(90deg);
    font-size: 1.4rem;
}

/* Theme Base */
.greeting-card {
    border-radius: 24px;
    padding: 50px 20px;
    text-align: center;
    color: white;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
    border: 5px solid #FFD700; /* Gold Border default */
}

/* Theme: Luxury Blue (Standard) */
.greeting-card.theme-blue {
    background: #004AAD;
    background-image: radial-gradient(circle at 50% 50%, rgba(0, 74, 173, 0.8), rgba(0, 30, 70, 1));
}

/* Theme: Party Pink */
.greeting-card.theme-pink {
    background: #ff4d6d;
    background-image: radial-gradient(circle at 50% 50%, #ff8fa3, #ff4d6d);
    border-color: #ffe5ec;
}
.greeting-card.theme-pink .greeting-title-main, 
.greeting-card.theme-pink .greeting-subtitle,
.greeting-card.theme-pink .brand { color: #ffe5ec; }
.greeting-card.theme-pink .greeting-photo-wrapper { background: #ffe5ec; border-color: #ffb3c1; }

/* Theme: Royal Purple */
.greeting-card.theme-purple {
    background: #5a189a;
    background-image: radial-gradient(circle at 50% 50%, #9d4edd, #5a189a);
    border-color: #e0aaff;
}
.greeting-card.theme-purple .greeting-title-main, 
.greeting-card.theme-purple .greeting-subtitle,
.greeting-card.theme-purple .brand { color: #e0aaff; }
.greeting-card.theme-purple .greeting-photo-wrapper { background: #e0aaff; border-color: #7b2cbf; }

/* Theme: Golden Glow */
.greeting-card.theme-gold {
    background: #fb8500;
    background-image: radial-gradient(circle at 50% 50%, #ffb703, #fb8500);
    border-color: #ffffff;
}
.greeting-card.theme-gold .greeting-title-main, 
.greeting-card.theme-gold .greeting-subtitle,
.greeting-card.theme-gold .brand { color: #ffffff; }
.greeting-card.theme-gold .greeting-photo-wrapper { background: #ffffff; border-color: #ffb703; }

/* Theme: Emerald Elegance */
.greeting-card.theme-green {
    background: #007f5f;
    background-image: radial-gradient(circle at 50% 50%, #55a630, #007f5f);
    border-color: #d8f3dc;
}
.greeting-card.theme-green .greeting-title-main, 
.greeting-card.theme-green .greeting-subtitle,
.greeting-card.theme-green .brand { color: #d8f3dc; }
.greeting-card.theme-green .greeting-photo-wrapper { background: #d8f3dc; border-color: #2d6a4f; }

/* Yari Dosti Logo top left */
.greeting-card .brand {
    position: absolute;
    top: 20px; left: 20px;
    font-weight: 800; font-size: 1.1rem;
    color: #FFD700; letter-spacing: 1px;
}

.greeting-card::before {
    content: '🎈'; position: absolute; top: 15px; right: 15px; font-size: 2.5rem; opacity: 0.8;
}

.greeting-card::after {
    content: '🎈'; position: absolute; bottom: 15px; left: 15px; font-size: 2.5rem; opacity: 0.8;
}

.greeting-card .ribbon {
    position: absolute;
    top: -10px; right: 50px;
    width: 30px; height: 100px;
    background: #FFD700;
    opacity: 0.3;
}

.greeting-title-main {
    font-family: 'Great Vibes', cursive;
    font-size: 4.5rem;
    color: #FFD700; 
    margin-bottom: 0px;
    line-height:1;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.greeting-subtitle {
    font-size: 2.2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 30px;
    background: linear-gradient(180deg, #fff, #bbb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.greeting-photo-wrapper {
    position: relative;
    width: 210px; height: 210px;
    margin: 0 auto 30px auto;
    border: 8px solid #0056b3;
    border-radius: 50%;
    padding: 5px;
    background: #FFD700; /* Gold ring */
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

.greeting-photo {
    width: 100%; height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.greeting-footer-msg {
    font-size: 1rem;
    line-height: 1.6;
    padding: 0 40px;
    color: rgba(255,255,255,0.9);
    font-style: italic;
    background: rgba(0,0,0,0.15);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
}

/* Floating Matrimony Tab */
.matrimony-side-tab {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    padding: 20px 10px;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    cursor: pointer;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    z-index: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.matrimony-side-tab:hover {
    padding-right: 20px;
    background: var(--primary-hover);
    transform: translateY(-50%) translateX(-5px);
}

.matrimony-side-tab i {
    transform: rotate(90deg);
}

.sidebar-card {
    background: var(--surface-color);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.sidebar-card h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--text-primary);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--surface-color);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    border-radius: var(--radius-md);
    padding: 30px;
    overflow-y: auto;
    position: relative;
    animation: modalSlide 0.3s ease-out;
}

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

.modal-close {
    position: absolute;
    top: 20px; right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
}

.form-group.full-width {
    grid-column: span 2;
}

/* Matrimony Card Style */
.matrimony-card {
    background: #FFF9C4; /* Light Yellow / Traditional Theme */
    border: 2px solid #FBC02D;
    color: #424242;
    padding: 25px;
    border-radius: 8px;
    position: relative;
    font-family: 'Outfit', serif; /* Or a more traditional font if desired */
    box-shadow: var(--shadow-md);
}

.mat_header {
    border-bottom: 2px solid #FBC02D;
    padding-bottom: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mat_title {
    font-weight: 700;
    font-size: 1.2rem;
    color: #C62828; /* Deep Red for headings */
}

.mat_photo {
    width: 120px;
    height: 150px;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: var(--shadow-sm);
    float: right;
    margin-left: 15px;
}

.mat_row {
    margin-bottom: 8px;
    display: flex;
    gap: 10px;
}

.mat_label {
    font-weight: 700;
    min-width: 100px;
    color: #1b5e20; /* Dark green for labels */
}

.mat_section_title {
    background: #FFEB3B;
    padding: 5px 10px;
    font-weight: 700;
    margin: 15px 0 10px 0;
    color: #D32F2F;
    border-left: 5px solid #D32F2F;
}

.mat_footer {
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px dashed #FBC02D;
    font-size: 0.85rem;
    color: #616161;
    font-style: italic;
}

/* Post Form */
.post-form {
    background: var(--surface-color);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}

.post-textarea {
    width: 100%;
    border: none;
    resize: none;
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    padding: 10px 0;
    outline: none;
}

.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
    margin-top: 10px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

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

/* Single Post */
.post-card {
    background: var(--surface-color);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 25px; /* Increased margin for air */
    border: 1px solid rgba(0,0,0,0.05); /* Subtle border */
}

.post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.post-author {
    font-weight: 600;
    color: var(--text-primary);
}

.post-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.post-content {
    line-height: 1.6;
}

.post-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
    margin-top: 15px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

/* Loader for Kundli Calculation */
.loader {
    width: 48px;
    height: 48px;
    border: 5px solid #FFE0B2;
    border-bottom-color: #FF9800;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

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

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }

    .desktop-nav {
        display: none !important;
    }

    .user-menu a[href="logout.php"] {
        display: none;
    }

    .feed-layout {
        padding: 10px;
    }

    .post-card, .sidebar-card, .post-form {
        padding: 15px;
        margin-bottom: 15px;
    }

    .auth-box {
        padding: 25px;
    }

    .auth-logo {
        font-size: 2rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group.full-width {
        grid-column: span 1;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
        margin: 10px;
    }

    .matrimony-side-tab, .greeting-side-tab {
        padding: 12px 6px;
        font-size: 0.75rem;
    }

    /* Greeting card adjustments */
    .greeting-title-main {
        font-size: 3rem;
    }

    .greeting-subtitle {
        font-size: 1.5rem;
    }

    .greeting-photo-wrapper {
        width: 160px;
        height: 160px;
    }

    /* Matrimony card adjustments */
    .mat_photo {
        width: 100px;
        height: 130px;
        margin-bottom: 10px;
    }

    .mat_label {
        min-width: 80px;
    }
}

@media (max-width: 480px) {
    .nav-logo img {
        height: 35px;
    }

    .post-header {
        gap: 8px;
    }

    .post-author {
        font-size: 0.95rem;
    }
}
