* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #050505;
    color: #ffffff;
    overflow-x: hidden;
    line-height: 1.6;
}

.text-gradient {
    background: linear-gradient(to right, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-blurple {
    color: #5865F2;
}

.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background:
        radial-gradient(circle at 15% 50%, rgba(88, 101, 242, 0.08), transparent 17%),
        radial-gradient(circle at 85% 30%, rgba(147, 51, 234, 0.08), transparent 17%);
}

nav {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 18px;
    padding: 25px 40px;
    max-width: 1600px;
    margin: 0 auto;
    margin-bottom: 0;
}

.flash-messages {
    max-width: 900px;
    margin: 16px auto 0;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.flash {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: #e5e7eb;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.flash-label {
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #9ca3af;
}

.flash-text {
    font-weight: 500;
}

.flash.success {
    border-color: rgba(16, 185, 129, 0.35);
    background: rgba(16, 185, 129, 0.08);
    color: #d1fae5;
}

.flash.error {
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.08);
    color: #fee2e2;
}

.flash.warning {
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.08);
    color: #fef3c7;
}

.flash.info {
    border-color: rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.08);
    color: #dbeafe;
}

.flash.fade-out {
    opacity: 0;
    transform: translateY(-4px);
}

.flash-inline {
    margin-bottom: 14px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.nav-actions form {
    margin: 0;
}

#nav-logo {
    height: 30px;
    width: auto;
    display: block;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.nav-logo-text {
    font-weight: 800;
    font-size: 1.8rem;
    letter-spacing: -0.6px;
    color: #e9edff;
    text-shadow: 0 2px 14px rgba(88, 101, 242, 0.3);
}

.logo-accent {
    color: #8fa0ff;
}


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

.nav-links a {
    color: #9ca3af;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

#nav-account-btn {
   font-size: 20px;
   padding: 10px 22px;
   color: white;
   border: 1px solid rgba(255, 255, 255, 0.08);
   padding: 14px 36px;
   border-radius: 10px;
   font-weight: 600;
   text-decoration: none;
   transition: all 0.2s ease;
   font-size: 1rem;
}

.nav-links a:hover {
    color: white;
}

.home-content {
    margin-top: 0px;
}

.logo-icon {
    width: 30px;
    height: 30px;
    background: #5865F2;
    border-radius: 6px;
    display: inline-block;
}

.status-pill {
    font-size: 0.8rem;
    padding: 5px 12px;
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.2);
    border-radius: 50px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.version-text {
    margin-top: 0;
    margin-bottom: 2px;
    display: inline-block;
    padding: 6px 16px;
    border-radius: 50px;
    background: rgba(88, 101, 242, 0.1);
    border: 1px solid rgba(88, 101, 242, 0.2);
    color: #5865F2;
    font-size: 0.8rem;
    font-weight: 600;
}

.nav-register {
    padding: 10px 22px;
    font-size: 0.95rem;
    border-radius: 10px;
    box-shadow: none;
}

.nav-logout-form {
    margin: 0;
}
.nav-logout-form button {
    border: none;
    cursor: pointer;
}

.status-dot {
    width: 6px;
    height: 6px;
    background-color: #2ecc71;
    border-radius: 50%;
    box-shadow: 0 0 10px #2ecc71;
}

/* Auth modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-card {
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.4);
    border-radius: 16px;
    padding: 28px;
    width: min(440px, 100%);
    position: relative;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.modal-overlay.show .modal-card {
    opacity: 1;
    transform: translateY(0);
}

.modal-title {
    margin: 0 0 18px;
    font-size: 1.4rem;
    font-weight: 700;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.2rem;
    cursor: pointer;
}

.modal-form .input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.modal-form label {
    font-size: 0.9rem;
    color: #d1d5db;
    font-weight: 600;
}

.modal-form input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px;
    color: #fff;
    font-size: 1rem;
    width: 100%;
    min-width: 0;
}

.modal-form input:focus {
    outline: none;
    border-color: #5865F2;
    box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.2);
}

.modal-actions-row {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    margin-top: 6px;
}
.modal-actions-left {
    justify-content: flex-start;
}
#account-modal .modal-actions-row {
    justify-content: flex-start;
}
.modal-actions-row form {
    margin: 0;
}
.modal-danger-row {
    justify-content: flex-start;
}

.ghost-btn {
    padding: 12px 18px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #d1d5db;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}
.danger-btn {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}
.danger-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #fff;
    border-color: rgba(239, 68, 68, 0.6);
}

.input-group.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.input-group.two-col > div {
    min-width: 0;
}

@media (max-width: 640px) {
    .modal-card {
        width: 100%;
    }
    .input-group.two-col {
        grid-template-columns: 1fr;
    }
}

body.modal-open {
    overflow: hidden;
}

.hero {
    text-align: center;
    padding: 80px 20px 60px;
    max-width: 900px;
    margin: 0 auto;
    animation: fadeIn 1s ease-out;
}

h1 {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 25px;
    letter-spacing: -2px;
}

.subtitle {
    font-size: 1.25rem;
    color: #9ca3af;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-group {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn {
    padding: 14px 36px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-large {
    padding: 18px 50px;
    font-size: 1.12rem;
    font-weight: 700;
}

.btn-primary {
    background-color: #5865F2;
    color: white;
    box-shadow: 0 0 30px rgba(88, 101, 242, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    background-color: #4752c4;
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(88, 101, 242, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.partners-title {
    text-align: center;
    font-size: 1.5rem;
    margin-top: 40px;
    font-weight: 600;
    background: linear-gradient(to right, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.partners {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
    opacity: 0.5;
    flex-wrap: wrap;
}

.partner-text {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -1px;
    color: #fff;
}

/* video placeholder */
.showcase-container {
    max-width: 1000px;
    margin: 80px auto;
    padding: 0 20px;
}

.video-frame {
    aspect-ratio: 16/9;
    background: #111;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.play-btn {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    transition: 0.3s;
    cursor: pointer;
}

.play-btn:hover {
    background: rgba(88, 101, 242, 0.8);
    transform: scale(1.1);
}

.play-icon {
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 18px solid white;
    margin-left: 5px;
}

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

.card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 35px;
    border-radius: 20px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(88, 101, 242, 0.3);
}

.card h3 {
    margin-bottom: 12px;
    font-size: 1.3rem;
}

.features h3 {
    background: linear-gradient(to right, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card p {
    color: #9ca3af;
    font-size: 0.95rem;
    line-height: 1.6;
}

.card-icon {
    font-size: 1.5rem;
    margin-bottom: 20px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: #5865F2;
}

.faq-section {
    max-width: 800px;
    margin: 0 auto 100px;
    padding: 0 20px;
}

.faq-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    font-weight: 700;
}

.faq-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
}

.faq-q {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #fff;
}

.faq-a {
    color: #9ca3af;
    font-size: 0.95rem;
}

footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    padding: 60px 0;
    color: #4b5563;
    font-size: 0.9rem;
    background: #020202;
}

.footer-links a {
    color: #6b7280;
    text-decoration: none;
    margin: 0 10px;
    transition: 0.2s;
}

.footer-links a:hover {
    color: #fff;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* adjustments for mobile */
@media (max-width: 768px) {
    h1 {
        font-size: 3rem;
    }

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

    .partners {
        gap: 20px;
        flex-direction: column;
        align-items: center;
    }
}

/* --- Styles for How-To Page --- */

.page-header {
    text-align: center;
    padding: 0px 20px 60px;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 15px;
}

.page-subtitle {
    color: #9ca3af;
    margin: 0 auto;
    max-width: 600px;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    color: #9ca3af;
    font-weight: 700;
}

.timeline-container {
    max-width: 800px;
    margin: 0 auto 100px;
    padding: 0 20px;
    position: relative;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 50px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #5865F2 0%, rgba(88, 101, 242, 0.1) 100%);
    z-index: 0;
}

.step-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 40px;
    margin-left: 80px;
    position: relative;
    backdrop-filter: blur(10px);
    transition: transform 0.2s ease;
}

.step-card:hover {
    transform: translateX(5px);
    border-color: rgba(88, 101, 242, 0.3);
}

.step-number {
    position: absolute;
    left: -95px;
    top: 25px;
    width: 50px;
    height: 50px;
    background: #050505;
    border: 2px solid #5865F2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    color: #5865F2;
    z-index: 1;
    box-shadow: 0 0 15px rgba(88, 101, 242, 0.2);
}

.step-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.step-desc {
    color: #9ca3af;
    margin-bottom: 15px;
}

.code-box {
    background: #000;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #2ecc71;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow-x: auto;
}

.copy-btn {
    position: absolute;
    right: 10px;
    top: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.copy-btn:hover {
    background: #5865F2;
}

.warn-card {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* fix for mobile */
@media (max-width: 768px) {
    .timeline-container::before {
        left: 20px;
    }

    .step-card {
        margin-left: 50px;
        padding: 20px;
    }

    .step-number {
        left: -65px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* --- Styles for Key Page --- */

.key-section {
    max-width: 900px;
    margin: 0 auto 120px;
    padding: 0 20px;
}

.key-card {
    background: radial-gradient(circle at 20% 20%, rgba(88, 101, 242, 0.12), transparent 45%), rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
}

.key-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.key-heading {
    font-size: 1.7rem;
    margin-bottom: 6px;
}

.key-subtext {
    color: #9ca3af;
    margin: 0;
}

.key-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(88, 101, 242, 0.12);
    border: 1px solid rgba(88, 101, 242, 0.4);
    color: #c7d2fe;
    font-weight: 700;
    font-size: 0.9rem;
}

.key-code-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: stretch;
    gap: 12px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 12px;
}

.key-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
    font-size: 0.8rem;
    color: #c7d2fe;
    background: rgba(88, 101, 242, 0.15);
    border: 1px solid rgba(88, 101, 242, 0.35);
}

.key-code {
    font-family: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 1.05rem;
    color: #e5e7eb;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
    overflow-wrap: anywhere;
    user-select: all;
}

.key-copy-btn {
    background: linear-gradient(135deg, #5865F2, #7c3aed);
    color: #fff;
    font-weight: 700;
    padding: 0 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
    min-width: 130px;
}

.key-copy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.35);
}

.key-copy-btn.copied {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 12px 30px rgba(22, 163, 74, 0.4);
}

.key-hints {
    margin-top: 18px;
    display: grid;
    gap: 6px;
}

.key-meta-row {
    margin-top: 14px;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(255, 255, 255, 0.02);
}

/* Created keys modal */
.key-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.key-mini-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.key-mini-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.key-label {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #c7d2fe;
    font-size: 0.8rem;
}

.pill {
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.8rem;
    border: 1px solid transparent;
}

.pill-active {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.3);
    color: #bbf7d0;
}

.pill-inactive {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fecdd3;
}

.key-mini-code {
    font-family: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.95rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 10px;
    color: #e5e7eb;
    overflow-wrap: anywhere;
}

.key-mini-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.key-mini-meta .key-meta-value {
    margin: 0;
}

.mini-copy-btn {
    margin-left: auto;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: #e5e7eb;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.mini-copy-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}

.key-meta-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #e5e7eb;
    margin: 4px 0;
}

.key-hint {
    color: #9ca3af;
    font-size: 0.95rem;
}

.key-hint a {
    color: #c7d2fe;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.key-hint a:hover {
    color: #fff;
}

@media (max-width: 720px) {
    .key-card {
        padding: 22px;
    }

    .key-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .key-code-row {
        grid-template-columns: 1fr;
    }

    .key-chip {
        width: fit-content;
    }

    .key-copy-btn {
        width: 100%;
        padding: 12px 14px;
    }
}
