:root {
    --kirvx-bg: #05070a;
    --kirvx-card: #0c1016;
    --kirvx-card-soft: #0d141c;
    --kirvx-border: rgba(255, 255, 255, 0.06);
    --kirvx-text: #f5f5f5;
    --kirvx-muted: #9ca3af;
    --kirvx-green: #47F138;
    --kirvx-red: #ff4b5c;
}

/* ============================================================
   WRAPPER
============================================================ */
.kirvx-profile {
    width: 100%;
    padding: 120px 8% 60px;
    background: radial-gradient(circle at 0% 0%, rgba(71,241,56,0.12) 0, transparent 45%) #05070a;
    color: var(--kirvx-text);
    box-sizing: border-box;
}

.profile-inner {
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================================
   HEADER
============================================================ */
.profile-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 32px;
    gap: 24px;
}

.profile-title-block h1 {
    font-size: 36px;
    letter-spacing: 0.04em;
    margin: 0 0 6px;
}

.profile-title-block p {
    margin: 0;
    color: var(--kirvx-muted);
    font-size: 14px;
}

/* ============================================================
   LOGIN REQUIRED (KIRVX CARD)
============================================================ */
.kirvx-login-required {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.kirvx-login-card {
    background: linear-gradient(135deg, rgba(15,23,42,0.96), #05070a);
    padding: 32px 26px;
    border-radius: 22px;
    border: 1px solid var(--kirvx-border);
    max-width: 420px;
    width: 100%;
    box-shadow: 0 22px 40px rgba(0,0,0,0.6);
    text-align: center;
    animation: fadeIn 0.35s ease;
}

.kirvx-login-card h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 600;
}

.kirvx-login-card p {
    margin: 0 0 20px;
    color: var(--kirvx-muted);
    font-size: 14px;
}

/* Login Buttons */
.login-btn-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kirvx-login-btn {
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.07);
    background: rgba(15,23,42,0.95);
    color: var(--kirvx-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: 0.2s ease;
}

.kirvx-login-btn.discord:hover {
    border-color: #5865f2;
    background: rgba(88,101,242,0.15);
    box-shadow: 0 0 10px rgba(88,101,242,0.35);
}

.kirvx-login-btn.google:hover {
    border-color: #ea4335;
    background: rgba(234,67,53,0.15);
    box-shadow: 0 0 10px rgba(234,67,53,0.35);
}

/* ============================================================
   USER SUMMARY (eingeloggt)
============================================================ */
.profile-user-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    border-radius: 999px;
    background: radial-gradient(circle at 10% 0%, rgba(71, 241, 56, 0.20) 0, transparent 40%) #0b1016;
    border: 1px solid var(--kirvx-border);
    min-width: 320px;
}

.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.10);
}
.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111827;
    font-weight: 600;
    font-size: 18px;
}

.profile-user-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-name {
    font-weight: 600;
    font-size: 15px;
}

.provider-pill {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.15);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.provider-discord { border-color: #5865f2; }
.provider-google  { border-color: #ea4335; }

.profile-email {
    font-size: 12px;
    color: var(--kirvx-muted);
}

.profile-id {
    font-size: 11px;
    color: rgba(148,163,184, 0.90);
}

/* ============================================================
   GRID
============================================================ */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 0.9fr;
    gap: 24px;
}

/* ============================================================
   CARDS
============================================================ */
.profile-card {
    background: linear-gradient(135deg, rgba(15,23,42,0.96), #05070a);
    border-radius: 18px;
    padding: 20px;
    border: 1px solid var(--kirvx-border);
    box-shadow: 0 22px 40px rgba(0, 0, 0, 0.6);
}

.profile-card h2 {
    font-size: 17px;
    margin: 0 0 4px;
}

.section-sub {
    margin: 0 0 14px;
    font-size: 13px;
    color: var(--kirvx-muted);
}

/* ============================================================
   CONNECTION ROWS
============================================================ */
.connection-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(31,41,55,0.8);
}

.connection-row:last-of-type {
    border-bottom: none;
}

.connection-label {
    font-size: 14px;
    font-weight: 500;
}

.connection-status {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
}

.connection-status.is-linked {
    color: var(--kirvx-green);
    background: rgba(71,241,56,0.08);
    border: 1px solid rgba(71,241,56,0.5);
}

.connection-status.is-unlinked {
    color: var(--kirvx-muted);
    background: rgba(15,23,42,0.9);
    border: 1px solid rgba(148,163,184,0.4);
}

/* ============================================================
   FORM
============================================================ */
.profile-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-row label {
    font-size: 13px;
    font-weight: 500;
}

.profile-form input,
.profile-form select,
.profile-form textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border-radius: 10px;
    border: 1px solid rgba(55,65,81,0.8);
    background: rgba(15,23,42,0.94);
    color: var(--kirvx-text);
    padding: 10px 12px;
    font-size: 13px;
    outline: none;
}

.profile-form textarea {
    resize: vertical;
}

.profile-form input:focus,
.profile-form select:focus,
.profile-form textarea:focus {
    border-color: rgba(71,241,56,0.75);
    box-shadow: 0 0 0 1px rgba(71,241,56,0.30);
}

.field-hint {
    font-size: 11px;
    color: var(--kirvx-muted);
}

.danger-hint {
    color: rgba(248,113,113,0.90);
}

/* ============================================================
   BUTTONS
============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 12px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: 0.18s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--kirvx-green);
    color: #000;
    font-weight: 600;
}

.btn-outline {
    background: transparent;
    color: var(--kirvx-text);
    border: 1px solid rgba(148,163,184,0.60);
}

.btn-outline:hover {
    border-color: var(--kirvx-green);
}

.btn-danger {
    background: rgba(248,113,113,0.1);
    border-color: rgba(248,113,113,0.7);
    color: #ffb4b4;
}

.btn-small {
    padding: 6px 12px;
    font-size: 11px;
}

/* ============================================================
   PRIVACY CARD
============================================================ */
.profile-privacy .privacy-block {
    margin-bottom: 20px;
}

.profile-privacy h3 {
    margin: 0 0 4px;
    font-size: 14px;
}

.profile-privacy p {
    margin: 0 0 8px;
    font-size: 12px;
    color: var(--kirvx-muted);
}

.privacy-divider {
    width: 100%;
    height: 1px;
    background: rgba(35,45,65,0.9);
    margin: 14px 0;
}

/* ============================================================
   MODAL
============================================================ */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10,15,25,0.85);
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.modal-backdrop.active {
    display: flex;
}

.modal {
    width: 100%;
    max-width: 400px;
    background: #020617;
    border: 1px solid rgba(248,113,113,0.45);
    border-radius: 14px;
    padding: 22px 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.85);
}

.modal p {
    font-size: 13px;
    color: var(--kirvx-muted);
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ============================================================
   RESPONSIVE
============================================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1024px) {
    .profile-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 820px) {
    .profile-header {
        flex-direction: column;
    }
    .profile-grid {
        grid-template-columns: 1fr;
    }
}
