@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono&display=swap');

:root {
    --bg-darkest: #05070a;
    --bg-card: #0d1117;
    --bg-nav: rgba(13, 17, 23, 0.8);
    --accent-blue: #0070f3;
    --accent-glow: rgba(0, 112, 243, 0.3);
    --text-main: #edeff2;
    --text-dim: #9ba1a6;
    --border-color: rgba(255, 255, 255, 0.05);
    --success: #00ff88;
    --danger: #ff4d4d;
    color-scheme: dark;
}

/* Role Colors */
.role-admin { color: #ff4d4d !important; font-weight: 700; }
.role-support { color: #ffaa00 !important; font-weight: 600; }
.role-customer { color: #00d4ff !important; font-weight: 600; }
.role-user { color: #9ba1a6 !important; }

* {
    box-sizing: border-box;
    transition: background 0.2s ease, border 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

select, option {
    transition: none !important;
}

body {
    background-color: #020408; /* Darker base */
    color: var(--text-main);
    font-family: 'Inter', -apple-system, sans-serif;
    margin: 0;
    line-height: 1.6;
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(0, 112, 243, 0.15), transparent 40%),
        radial-gradient(circle at 100% 0%, rgba(0, 112, 243, 0.05), transparent 30%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    scrollbar-gutter: stable;
}

/* Animate only the content, not the sticky header */
main, 
.container:not(header .container), 
.admin-layout,
.auth-card {
    animation: pageFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pageFadeIn {
    from { 
        opacity: 0; 
        transform: translateY(8px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

/* Glassmorphism Navigation */
header {
    background-color: transparent; /* Remove background, keep only blur */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.2rem 5%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -0.5px;
    text-decoration: none !important;
    color: #fff !important;
    display: flex;
    align-items: center;
}

.logo:hover {
    text-decoration: none !important;
}

.logo img {
    height: 40px;
    width: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a, .nav-links button {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    background: none;
    border: none;
    padding: 0.3rem 0;
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
}

.nav-links a:hover, .nav-links button:hover {
    color: #fff;
    text-decoration: none;
}

/* Underline only for standard links, not buttons */
.nav-links a:not(.btn-nav):not(.btn-primary)::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-blue);
    transition: width 0.3s ease;
}

.nav-links a:not(.btn-nav):not(.btn-primary):hover::after {
    width: 100%;
}

.nav-links .btn-nav {
    background: var(--accent-blue);
    color: #fff !important;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    box-shadow: 0 4px 14px 0 rgba(0, 118, 255, 0.25);
}

.nav-links .btn-nav:hover {
    background: #0062d1;
    box-shadow: 0 6px 20px rgba(0, 118, 255, 0.4);
    transform: translateY(-1px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.flex-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
}

/* Modern Card Design */
.card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
    opacity: 0.3;
}

h1, h2, h3 {
    margin-top: 0;
    letter-spacing: -0.5px;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Sleek Inputs */
input, select, textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: #fff;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    margin-top: 0.5rem;
    color-scheme: dark;
    transition: all 0.2s ease;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent-blue);
    background-color: rgba(255, 255, 255, 0.03);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

select option {
    background-color: #161b22;
    color: #fff;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-align: center;
    font-size: 0.95rem;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--accent-blue);
    color: #fff;
    box-shadow: 0 4px 14px 0 rgba(0, 118, 255, 0.3);
}

.btn-primary:hover {
    background-color: #0061d5;
    box-shadow: 0 6px 20px rgba(0, 118, 255, 0.4);
    transform: translateY(-1px);
}

.btn-discord {
    background-color: #5865F2;
    color: #fff !important;
    gap: 0.75rem;
}

.btn-discord:hover {
    background-color: #4752C4;
    box-shadow: 0 6px 20px rgba(88, 101, 242, 0.4);
    transform: translateY(-1px);
}

.btn-discord svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.btn-outline {
    background: transparent;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-main);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
    transform: translateY(-1px);
}

.btn-small {
    height: 38px;
    padding: 0 1.2rem;
    font-size: 0.85rem;
    border-radius: 6px;
}

.btn-danger {
    background-color: var(--danger);
    color: #fff;
}

/* Smooth Avatar Loading */
.avatar-container {
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.avatar-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Tables */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    margin-top: 1rem;
}

/* Rich Content Support */
.rich-content h1, .rich-content h2, .rich-content h3 {
    color: #fff;
    margin: 1.5rem 0 1rem 0;
}

.rich-content p {
    margin-bottom: 1rem;
    color: var(--text-dim);
}

.rich-content ul, .rich-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.rich-content li {
    margin-bottom: 0.5rem;
    color: var(--text-dim);
}

.rich-content pre {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.rich-content details {
    background: transparent;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.rich-content summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--accent-blue);
    outline: none;
}

.rich-content hr {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 2rem 0;
}

.rich-content img {
    max-width: 100%;
    border-radius: 12px;
}

th {
    color: var(--text-dim);
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    padding: 0 1rem;
    text-align: center;
}

th:first-child, td:first-child {
    text-align: left;
}

td {
    padding: 1.2rem 1rem;
    background-color: transparent;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    vertical-align: middle;
}

td:first-child {
    border-left: 1px solid var(--border-color);
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

td:last-child {
    border-right: 1px solid var(--border-color);
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

code {
    font-family: 'JetBrains Mono', monospace;
    background: rgba(0, 112, 243, 0.1);
    color: var(--accent-blue);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

/* Alerts */
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.card-placeholder {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 4rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.card-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
    opacity: 0.3;
}

.card-placeholder i, .card-placeholder .icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.card-placeholder p {
    margin: 0;
    max-width: 400px;
    line-height: 1.6;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background: rgba(0, 255, 136, 0.1);
    color: var(--success);
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.alert-danger {
    background: rgba(255, 77, 77, 0.1);
    color: var(--danger);
    border: 1px solid rgba(255, 77, 77, 0.2);
}

.hero {
    text-align: center;
    padding: 5rem 1rem;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.hero p {
    color: var(--text-dim);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

/* Admin Sidebar Layout */
.admin-layout {
    display: flex;
    opacity: 0;
}

.admin-layout.ready {
    opacity: 1;
}

.admin-sidebar {
    width: 280px;
    background: transparent;
    border-right: none;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.2rem;
    color: var(--text-dim);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
}

.admin-sidebar-link:hover, .admin-sidebar-link.active {
    background: rgba(0, 112, 243, 0.1);
    color: var(--accent-blue);
}

.admin-main {
    flex: 1;
    padding: 3rem;
    background: transparent;
}

.admin-section {
    display: none;
    opacity: 0;
    transform: translateY(8px);
}

.admin-section.active {
    display: block;
    animation: adminFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.page-fade-in {
    opacity: 0;
    transform: translateY(10px);
    animation: adminFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes adminFadeIn {
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Product Grid & Cards */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-blue);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.product-card .card-content {
    flex: 1;
}

.product-card .description {
    color: var(--text-dim);
    font-size: 0.95rem;
    margin: 1rem 0;
    min-height: 3em;
}

.product-card .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.price-tag {
    font-weight: 800;
    font-size: 1.75rem;
    color: #fff;
}

.button-group {
    display: flex;
    gap: 0.75rem;
}

.btn-stripe {
    background: rgba(103, 114, 229, 0.1);
    border: 1px solid #6772e5;
    color: #fff;
}

.btn-stripe:hover {
    background: #6772e5;
    transform: translateY(-2px);
}

/* Payment Selection Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 7, 10, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: transparent;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 3rem;
    width: 95%;
    max-width: 500px;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transition: transform 0.3s ease, opacity 0.3s ease !important;
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    cursor: pointer;
    color: var(--text-dim);
    font-size: 1.2rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
    transform: rotate(90deg);
}

.payment-options-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.payment-opt {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    text-align: left;
    width: 100%;
}

.payment-opt:hover {
    border-color: var(--accent-blue);
    background: rgba(0, 112, 243, 0.05);
}

.payment-opt img {
    width: 32px;
    height: 32px;
}

.payment-opt .opt-text {
    flex: 1;
}

.payment-opt .opt-title {
    display: block;
    font-weight: 600;
    color: #fff;
}

.payment-opt .opt-sub {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* Admin Plan Management Refinement */
.plans-container {
    background: transparent;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.plan-header-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 100px;
    gap: 1rem;
    padding: 0 1rem 0.75rem 1rem;
    color: var(--text-dim);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.plan-item-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 100px;
    gap: 1rem;
    padding: 1rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    align-items: center;
}

.plan-item-row:hover {
    border-color: rgba(0, 112, 243, 0.3);
    background: rgba(255, 255, 255, 0.04);
}

.plan-add-form {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 100px;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    align-items: flex-end;
}

.plan-input {
    background: transparent !important;
    padding: 0.6rem 1rem !important;
    font-size: 0.9rem !important;
    margin-top: 0 !important;
}

/* Forms */
form div {
    margin-bottom: 1.25rem;
}

.auth-card {
    max-width: 450px;
    margin: 8rem auto;
    padding: 3rem;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-dim);
    font-size: 0.95rem;
}



/* Footer */
.site-footer {
    background: transparent;
    padding: 5rem 0 3rem 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 4rem;
    flex-wrap: wrap;
}

.footer-brand {
    max-width: 350px;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
}

.footer-logo {
    height: 48px;
    width: 48px;
    border-radius: 10px;
    object-fit: cover;
}

.footer-brand h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
    color: #fff;
}

.footer-tagline {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-top: 1.5rem;
}

.footer-links {
    display: flex;
    gap: 5rem;
    flex-wrap: wrap;
}

.link-group h4 {
    color: #fff;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.link-group a {
    display: block;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
    transition: color 0.2s ease;
}

.link-group a:hover {
    color: var(--accent-blue);
    text-decoration: none;
}

.footer-bottom {
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
}


