@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    --primary: #1565C0;
    --primary-light: #42A5F5;
    --primary-dark: #0D47A1;
    --accent: #00E5FF;
    --bg-dark: #0A1128;
    --bg-light: #F0F8FF;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --text-main: #FFFFFF;
    --text-muted: #9BA4B5;
    --success: #00C853;
    --warning: #FFAB00;
    --danger: #FF3D00;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    background-image: radial-gradient(circle at top right, #1565C0 0%, transparent 40%),
        radial-gradient(circle at bottom left, #0D47A1 0%, transparent 40%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Glassmorphism Utilities */
.glass {
    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(--glass-shadow);
}

/* Layout */
header {
    padding: 1.5rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    transition: all 0.3s ease;
}

header.scrolled {
    background: rgba(10, 17, 40, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
}

.logo i {
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

/* Base Buttons */
.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.6);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
}

.btn-outline:hover {
    background: rgba(0, 229, 255, 0.1);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

/* Views Management */
.view-section {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    padding-top: 100px;
    /* Space for fixed header */
    min-height: calc(100vh - 80px);
}

.view-section.active {
    display: block;
}

.view-section.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(0, 229, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 229, 255, 0);
    }
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 2rem 0 6rem 0;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #FFF, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.check-bill-box {
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

.check-bill-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, transparent, var(--accent), transparent);
    animation: rotate 6s linear infinite;
    opacity: 0.1;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 1rem 1.2rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

select.form-control option {
    background-color: var(--bg-dark);
    color: #FFF;
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.user-profile {
    padding: 2rem;
    text-align: center;
}

.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(66, 165, 245, 0.5);
}

.user-info h3 {
    margin-bottom: 0.2rem;
}

.user-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.badge-success {
    background: rgba(0, 200, 83, 0.2);
    color: var(--success);
}

.badge-warning {
    background: rgba(255, 171, 0, 0.2);
    color: var(--warning);
}

.badge-danger {
    background: rgba(255, 61, 0, 0.2);
    color: var(--danger);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.stat-box {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 8px;
    text-align: left;
}

.stat-box span {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.3rem;
}

.stat-box strong {
    font-size: 1.2rem;
    font-family: 'Outfit';
}

/* Dashboard Main Area */
.dash-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.bill-banner {
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(21, 101, 192, 0.6), rgba(13, 71, 161, 0.8));
    border-left: 4px solid var(--accent);
}

.bill-amount h4 {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.bill-amount h2 {
    font-size: 2.5rem;
    color: #fff;
}

.chart-container {
    padding: 1.5rem;
}

.chart-container h3 {
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    transition: background 0.3s;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.history-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.history-icon {
    width: 40px;
    height: 40px;
    background: rgba(0, 229, 255, 0.1);
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Payment View */
.payment-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.payment-header {
    text-align: center;
    margin-bottom: 2rem;
}

.payment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.payment-summary,
.payment-methods {
    padding: 2rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item.total {
    font-size: 1.3rem;
    font-weight: 700;
    font-family: 'Outfit';
    color: var(--accent);
    margin-top: 1rem;
}

.method-option {
    display: block;
    position: relative;
    margin-bottom: 1rem;
    cursor: pointer;
}

.method-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.method-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.method-option input:checked~.method-card {
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
    background: rgba(0, 229, 255, 0.05);
}

.method-icon {
    width: 50px;
    height: 35px;
    background: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem;
}

.method-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Features grid */
.features {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.2), rgba(33, 150, 243, 0.2));
    color: var(--accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.4);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    color: var(--text-muted);
    border-top: 1px solid var(--glass-border);
}

/* Responsive */
@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    .hero,
    .payment-grid,
    .features-grid,
    .auth-container {
        grid-template-columns: 1fr !important;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .view-section {
        padding-top: 80px;
    }
}