/* ==========================================
   KSHANAM.IN - Core Premium Design System
   Traditional Emerald Green & Kasavu Gold Theme
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap');

:root {
    /* Emerald Colors */
    --emerald-deep: #062f21;
    --emerald-dark: #064e3b;
    --emerald-mid: #059669;
    --emerald-light: #10b981;
    --emerald-pale: #a7f3d0;
    
    /* Gold Colors */
    --gold-dark: #855c1b;
    --gold-mid: #b45309;
    --gold-light: #d97706;
    --gold-metallic: #d4af37;
    --gold-bright: #fbbf24;
    --gold-glow: rgba(212, 175, 55, 0.25);
    
    /* Core Gradients */
    --bg-gradient: radial-gradient(circle at top, #083c2c 0%, #031c14 60%, #010b07 100%);
    --gold-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
    --gold-metallic-gradient: linear-gradient(135deg, #ffe082 0%, #d4af37 40%, #b45309 80%, #ffd54f 100%);
    --card-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    --btn-danger: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    
    /* Interface Neutral Colors */
    --text-white: #f9fafb;
    --text-light: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dark: #1f2937;
    
    /* Effects */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(212, 175, 55, 0.15);
    --glass-border-hover: rgba(212, 175, 55, 0.4);
    --shadow-premium: 0 12px 40px 0 rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 25px var(--gold-glow);
    
    /* Fonts */
    --font-ui: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --font-serif: 'Playfair Display', serif;
}

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

body {
    background: var(--bg-gradient);
    color: var(--text-white);
    font-family: var(--font-ui);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--gold-bright);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--text-white);
    text-shadow: var(--shadow-glow);
}

button {
    font-family: var(--font-ui);
}

/* Glassmorphism Panel Utilities */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--shadow-premium);
    transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.3s ease;
}

.glass-panel:hover {
    border-color: var(--glass-border-hover);
    box-shadow: 0 16px 48px 0 rgba(0, 0, 0, 0.7), var(--shadow-glow);
}

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

@keyframes pulseGold {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4); }
    70% { box-shadow: 0 0 0 12px rgba(212, 175, 55, 0); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

@keyframes rotateLeaf {
    0% { transform: rotate(0deg); }
    50% { transform: rotate(8deg); }
    100% { transform: rotate(0deg); }
}

.animate-fade {
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Navigation Header */
nav.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(3, 28, 20, 0.8);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-white);
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-brand span {
    background: var(--gold-metallic-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-brand svg {
    fill: var(--gold-metallic);
    animation: rotateLeaf 4s ease-in-out infinite;
}

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

.nav-links a {
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
}

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

.btn-premium {
    background: var(--gold-metallic-gradient);
    color: var(--emerald-deep);
    font-weight: 700;
    border: none;
    border-radius: 50px;
    padding: 10px 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.6);
    color: var(--emerald-deep);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--gold-border, rgba(212, 175, 55, 0.5));
    color: var(--gold-bright);
    font-weight: 600;
    border-radius: 50px;
    padding: 10px 24px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--gold-metallic);
}

/* Landing Marketing Section */
.hero {
    max-width: 1200px;
    margin: 80px auto;
    padding: 0 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero h2 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 6vw, 3.8rem);
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero h2 span {
    font-style: italic;
    background: var(--gold-metallic-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    max-width: 700px;
    margin-bottom: 40px;
}

.cta-group {
    display: flex;
    gap: 15px;
    margin-bottom: 60px;
}

/* Pricing Grid */
.section-title {
    font-family: var(--font-heading);
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 50px;
}

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

.pricing-card {
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.pricing-card.featured {
    border-color: var(--gold-metallic);
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.15) 0%, rgba(212, 175, 55, 0.05) 100%);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.15);
}

.pricing-badge {
    position: absolute;
    top: 20px;
    right: -30px;
    background: var(--gold-gradient);
    color: var(--emerald-deep);
    font-weight: 700;
    font-size: 0.75rem;
    padding: 4px 30px;
    transform: rotate(45deg);
    text-transform: uppercase;
}

.price-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.price-cost {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gold-bright);
    margin-bottom: 25px;
}

.price-cost span {
    font-size: 1rem;
    color: var(--text-muted);
}

.pricing-features {
    list-style: none;
    width: 100%;
    margin-bottom: 35px;
    flex-grow: 1;
}

.pricing-features li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.95rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pricing-features li svg {
    fill: var(--gold-metallic);
    flex-shrink: 0;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 11, 7, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 100%;
    max-width: 450px;
    padding: 40px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    cursor: pointer;
    fill: var(--text-muted);
    transition: fill 0.3s;
}

.modal-close:hover {
    fill: var(--text-white);
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
}

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

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-white);
    font-family: var(--font-ui);
    font-size: 0.95rem;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--gold-metallic);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.15);
}

select.form-control option {
    background: var(--emerald-deep);
    color: var(--text-white);
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.form-footer a {
    color: var(--gold-bright);
    font-weight: 600;
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: calc(100vh - 81px);
}

.dashboard-sidebar {
    width: 260px;
    background: rgba(2, 17, 12, 0.9);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
}

.sidebar-profile {
    margin-bottom: 40px;
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gold-gradient);
    color: var(--emerald-deep);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 10px auto;
    box-shadow: var(--shadow-glow);
}

.profile-name {
    font-weight: 600;
    font-size: 1rem;
}

.profile-role {
    font-size: 0.75rem;
    color: var(--gold-bright);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-item {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
    color: var(--text-light);
}

.sidebar-item svg {
    fill: var(--text-muted);
}

.sidebar-item:hover, .sidebar-item.active {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold-bright);
}

.sidebar-item:hover svg, .sidebar-item.active svg {
    fill: var(--gold-bright);
}

.dashboard-content {
    flex-grow: 1;
    padding: 40px;
    overflow-y: auto;
    max-width: 1400px;
}

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

.dashboard-title h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
}

.dashboard-title p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Dashboard Summary Cards */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-info h4 {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-info .stat-value {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 5px;
    color: var(--gold-bright);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    justify-content: center;
    align-items: center;
}

.stat-icon svg {
    fill: var(--gold-metallic);
}

/* User Invitation Listing */
.invitation-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.invitation-card {
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.invitation-badge {
    align-self: flex-start;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.invitation-badge.paid {
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid var(--gold-metallic);
    color: var(--gold-bright);
}

.invitation-badge.free {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
}

.invitation-card h5 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.invitation-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.invitation-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.invitation-actions {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-small.primary {
    background: var(--gold-metallic-gradient);
    color: var(--emerald-deep);
    border: none;
}

.btn-small.secondary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

.btn-small.danger {
    background: var(--btn-danger);
    color: var(--text-light);
    border: none;
}

.btn-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* Table styling for RSVPs / Users list */
.table-responsive {
    overflow-x: auto;
    margin-top: 20px;
}

.premium-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.premium-table th {
    padding: 16px 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
    letter-spacing: 0.5px;
}

.premium-table td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.9rem;
    color: var(--text-light);
}

.premium-table tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

.status-indicator {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-indicator.attending {
    background: rgba(5, 150, 105, 0.15);
    color: var(--emerald-light);
}

.status-indicator.decline {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.status-indicator.tentative {
    background: rgba(217, 119, 6, 0.15);
    color: var(--gold-bright);
}

/* Wallet Box */
.wallet-box {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(3, 28, 20, 0.4) 100%);
    border: 1px solid var(--gold-metallic);
    padding: 30px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.wallet-details h6 {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.wallet-balance {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--gold-bright);
    margin-top: 5px;
}

/* Advertisement Display Area (Within invitations) */
.ad-wrapper {
    width: 100%;
    max-width: 600px;
    margin: 40px auto;
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    text-align: center;
    position: relative;
}

.ad-label {
    position: absolute;
    top: -10px;
    left: 20px;
    background: #020e0a;
    padding: 0 10px;
    font-size: 0.65rem;
    color: var(--gold-bright);
    font-weight: 600;
    text-transform: uppercase;
}

.ad-banner {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: block;
    margin-bottom: 6px;
    transition: filter 0.3s;
}

.ad-banner:hover {
    filter: brightness(1.1);
}

.ad-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ==========================================
   PUBLIC INVITATION STYLING - invite.html
   ========================================== */
.invite-container {
    max-width: 650px;
    margin: 40px auto;
    padding: 0 15px;
}

.invitation-cover {
    border: 1px solid var(--gold-metallic);
    padding: 50px 30px;
    text-align: center;
    position: relative;
    border-radius: 20px;
    background: linear-gradient(180deg, #031e15 0%, #010a07 100%);
    box-shadow: var(--shadow-premium);
}

.invitation-cover::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 15px;
    pointer-events: none;
}

.invitation-title {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 500;
    color: var(--gold-bright);
    margin-bottom: 15px;
}

.invitation-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 30px;
}

.invitation-names {
    font-family: var(--font-serif);
    font-size: 3rem;
    color: var(--text-white);
    margin-bottom: 25px;
    line-height: 1.2;
}

.invitation-date {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--gold-metallic);
    margin-bottom: 30px;
}

.invitation-venue {
    font-size: 1rem;
    color: var(--text-light);
    max-width: 450px;
    margin: 0 auto 30px auto;
}

/* Audio Floating Controller */
.audio-controller {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gold-metallic-gradient);
    border: none;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 100;
    animation: rotateLeaf 6s infinite;
}

.audio-controller svg {
    fill: var(--emerald-deep);
}

/* Wishes Wall */
.wishes-wall-container {
    margin-top: 50px;
}

.wishes-title {
    font-family: var(--font-heading);
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

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

.wish-card {
    padding: 20px;
}

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

.wish-sender {
    font-weight: 600;
    color: var(--gold-bright);
    font-size: 0.95rem;
}

.wish-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.wish-message {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.wish-reactions {
    display: flex;
    gap: 15px;
}

.react-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    padding: 4px 12px;
    font-size: 0.75rem;
    color: var(--text-light);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.react-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--gold-metallic);
    color: var(--gold-bright);
}

/* Offline PWA banner notice */
.offline-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--gold-gradient);
    color: var(--emerald-deep);
    text-align: center;
    padding: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    z-index: 1001;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    display: none;
}

.offline-banner.active {
    display: block;
}

/* Image slideshow for invitations */
.slideshow-container {
    width: 100%;
    height: 250px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 25px;
    border: 1px solid var(--glass-border);
}

.slideshow-slide {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slideshow-slide.active {
    opacity: 1;
}

/* Grid / responsive fixes */
@media (max-width: 768px) {
    nav.navbar {
        padding: 15px 20px;
    }
    .nav-links {
        display: none; /* simple burger menu omission for SPA simplicity */
    }
    .dashboard-container {
        flex-direction: column;
    }
    .dashboard-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding: 20px;
    }
    .dashboard-content {
        padding: 20px;
    }
}
