/* Bhāramāstra - Ultra Modern Creative UI */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #8b5cf6;
    --secondary-color: #d946ef;
    --accent-color: #06b6d4;
    --text-primary: #1e293b;
    --text-white: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.4);
    --card-border: rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    --sidebar-width: 280px;
    --sidebar-bg: rgba(255, 255, 255, 0.5);
    --input-bg: rgba(255, 255, 255, 0.6);
}

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

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    min-height: 100vh;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    background: #f0f2f5;
}

/* Animated Background */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(45deg, #f3e8ff 0%, #e0f2fe 100%);
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--primary-color), transparent 70%);
    animation-delay: 0s;
}

.orb-2 {
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--secondary-color), transparent 70%);
    animation-delay: -5s;
}

.orb-3 {
    top: 40%;
    left: 40%;
    width: 30vw;
    height: 30vw;
    background: radial-gradient(circle, var(--accent-color), transparent 70%);
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -50px) rotate(10deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(-5deg);
    }

    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

.main-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Sidebar - Ultra Glass */
.sidebar {
    display: flex;
    flex-direction: column;
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-right: 1px solid var(--card-border);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    padding: 2rem 1.5rem;
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 3.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    position: relative;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    border-radius: 2px;
}

.logo i {
    font-size: 1.8rem;
    color: var(--primary-color);
    background: none;
    -webkit-text-fill-color: initial;
}

.sidebar-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 16px;
    text-decoration: none;
    color: #475569;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    background: transparent;
}

.sidebar-nav .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.4s ease;
    z-index: -1;
}

.sidebar-nav .nav-link:hover::before {
    transform: translateX(0);
}

.sidebar-nav .nav-link:hover {
    color: var(--primary-color);
    padding-left: 25px;
}

.sidebar-nav .nav-link.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    box-shadow: 0 10px 25px -5px rgba(139, 92, 246, 0.5);
    transform: scale(1.02);
}

.sidebar-nav .nav-link.active i {
    color: white;
}

/* Content Area */
.content-area {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: calc(100% - var(--sidebar-width));
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 3.5rem;
    position: relative;
    z-index: 10;
}

.header-content h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -2px;
    text-shadow: 0 20px 40px rgba(139, 92, 246, 0.1);
}

.header-subtitle {
    font-size: 1.2rem;
    color: #64748b;
    font-weight: 500;
}

/* 3D Cards */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-style: preserve-3d;
}

.card:hover,
.hover-up:hover {
    transform: translateY(-10px) rotateX(2deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(255, 255, 255, 0.8);
}

.card.form-container,
.tab-section {
    width: 100%;
    max-width: 900px;
    padding: 3.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: visible;
    /* For 3D floating inputs */
}

/* Form Styling */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.form-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.form-title i {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 2.5rem;
}

.form-group {
    margin-bottom: 2.5rem;
    position: relative;
}

label {
    display: block;
    margin-bottom: 0.8rem;
    color: #475569;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.form-control,
.form-select {
    width: 100%;
    padding: 16px 24px;
    background: var(--input-bg);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    color: #1e293b;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02), inset 0 2px 4px rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    background: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.2), 0 10px 20px rgba(0, 0, 0, 0.05);
    outline: none;
    transform: scale(1.01);
}

/* Radio & Checkbox Buttons - Neumorphicish */
.transaction-type-group,
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.transaction-type-label,
.checkbox-button-label {
    padding: 14px 24px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.transaction-type-label:hover,
.checkbox-button-label:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
}

.transaction-type-label:has(input:checked),
.checkbox-button-label:has(input:checked),
.checkbox-button-label.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 10px 25px -5px rgba(139, 92, 246, 0.5);
    transform: scale(1.05);
}

.transaction-type-label input,
.checkbox-button-label input {
    display: none;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 16px;
    margin-top: 3rem;
    justify-content: center;
}

.btn {
    padding: 16px 32px;
    border-radius: 16px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    box-shadow: 0 10px 30px -5px rgba(139, 92, 246, 0.5);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -5px rgba(139, 92, 246, 0.6);
}

.btn-secondary {
    background: white;
    color: var(--text-primary);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background: #f8fafc;
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
}

.reset-button {
    background: rgba(254, 202, 202, 0.3);
    color: #ef4444;
}

.reset-button:hover {
    background: rgba(239, 68, 68, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.15);
}

/* Output Box */
.output-box {
    background: #0f172a;
    border-radius: 20px;
    padding: 30px;
    color: #e2e8f0;
    font-family: 'Space Grotesk', monospace;
    min-height: 140px;
    margin-top: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    box-shadow: inset 0 2px 20px rgba(0, 0, 0, 0.3);
}

.output-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 80px;
    opacity: 0.5;
}

.output-placeholder i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Notifications */
.notification {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    color: #1e293b;
    padding: 20px 30px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    transform: translateY(150px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.6, 0.32, 1.6);
    z-index: 2000;
    border: 1px solid rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification i {
    color: #10b981;
    font-size: 1.5rem;
}

/* Suggestions */
.suggestion-box {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    z-index: 50;
    max-height: 280px;
    overflow-y: auto;
    padding: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.suggestion-box div {
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    color: #334155;
}

.suggestion-box div:hover {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.1), transparent);
    color: var(--primary-color);
    padding-left: 25px;
}

/* Dashboard Cards (index.html) specific */
.hover-up {
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.icon-circle {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
}

.hover-up:hover .icon-circle {
    transform: scale(1.1) rotate(5deg);
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .main-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 1rem 1.5rem;
        background: rgba(255, 255, 255, 0.8);
    }

    .logo {
        margin-bottom: 0;
        font-size: 1.4rem;
    }

    .sidebar-nav {
        overflow-x: auto;
        padding-bottom: 5px;
    }

    .sidebar-nav ul {
        flex-direction: row;
        gap: 8px;
    }

    .sidebar-nav .nav-link {
        padding: 10px 16px;
        white-space: nowrap;
    }

    .content-area {
        margin-left: 0;
        width: 100%;
        padding: 1.5rem;
    }

    .header-content h1 {
        font-size: 2.2rem;
    }

    .card.form-container,
    .tab-section {
        padding: 2rem;
    }

    .btn {
        padding: 14px 24px;
        font-size: 0.85rem;
    }
}

/* OAuth & Dividers */
.divider hr {
    border-color: rgba(0, 0, 0, 0.1);
}

.divider span {
    background: transparent;
    color: #64748b;
    font-weight: 600;
}

.oauth-btn {
    transition: all 0.3s ease !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    padding: 12px !important;
}

.oauth-btn:hover {
    background: rgba(0, 0, 0, 0.02) !important;
    border-color: rgba(0, 0, 0, 0.2) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}