/* themes/wallpaper_blur.css
 * Glassmorphism cam paneli — Apple-style. Koyu/yoğun arka plan üzerine beyaz metin.
 * Branding değişkenleri (--wmg-primary, --wmg-accent, --wmg-bg-blur, --wmg-bg-overlay,
 * --wmg-radius, --wmg-font) dinamik; card şeffaflığı tema-sabit.
 */

*, *::before, *::after { box-sizing: border-box; }

.wmg-body {
    margin: 0;
    font-family: var(--wmg-font, system-ui), -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    color: #fff;
    background: #0d1117;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.wmg-stage {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.wmg-stage--bg {
    background-size: var(--wmg-bg-position, cover);
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Arka plan yoksa primary_color'dan gradient üret */
.wmg-stage--gradient {
    background:
        radial-gradient(ellipse at 20% 0%, color-mix(in srgb, var(--wmg-primary) 60%, #000) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, color-mix(in srgb, var(--wmg-accent) 50%, #000) 0%, transparent 50%),
        linear-gradient(135deg, #0d1117 0%, #1a2230 100%);
}

.wmg-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, var(--wmg-bg-overlay, 0.45));
    backdrop-filter: blur(var(--wmg-bg-blur, 0));
    -webkit-backdrop-filter: blur(var(--wmg-bg-blur, 0));
    pointer-events: none;
    z-index: 0;
}

/* ---------- Cam paneli kart ---------- */
.wmg-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    padding: 40px 36px 32px;
    text-align: center;

    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);

    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--wmg-radius, 20px);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, .45),
        0 1px 0 rgba(255, 255, 255, .12) inset,
        0 -1px 0 rgba(0, 0, 0, .15) inset;

    color: #fff;
}

/* ---------- Logo / brand ---------- */
.wmg-card__head { margin-bottom: 8px; }

.wmg-logo {
    max-width: 96px;
    max-height: 96px;
    margin: 0 auto 14px;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .35));
}

.wmg-logo--placeholder {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--wmg-primary) 80%, white),
        var(--wmg-accent, var(--wmg-primary)));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}

.wmg-brand {
    margin: 0 0 4px 0;
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    line-height: 1.25;
    letter-spacing: -.01em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}

.wmg-domain {
    margin: 0;
    color: rgba(255, 255, 255, .72);
    font-size: 14px;
    font-weight: 400;
}

.wmg-welcome {
    margin: 14px 0 0 0;
    font-size: 13px;
    color: rgba(255, 255, 255, .65);
    line-height: 1.55;
}

/* ---------- Alert ---------- */
.wmg-alert {
    margin: 18px 0 0 0;
    padding: 10px 14px;
    background: rgba(255, 80, 80, .15);
    border: 1px solid rgba(255, 120, 120, .35);
    border-radius: 10px;
    color: #ffd6d6;
    font-size: 13px;
    text-align: left;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ---------- Form ---------- */
.wmg-form { margin-top: 26px; text-align: left; }

.wmg-field {
    display: flex;
    align-items: stretch;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    transition: border-color .2s, box-shadow .2s, background .2s;
    overflow: hidden;
}

.wmg-field:hover {
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(255, 255, 255, 0.24);
}

.wmg-field:focus-within {
    background: rgba(255, 255, 255, 0.13);
    border-color: color-mix(in srgb, var(--wmg-accent, var(--wmg-primary)) 70%, white);
    box-shadow:
        0 0 0 3px color-mix(in srgb, var(--wmg-accent, var(--wmg-primary)) 25%, transparent),
        0 4px 12px rgba(0, 0, 0, .15);
}

.wmg-field input {
    flex: 1;
    border: 0;
    background: transparent;
    outline: 0;
    padding: 13px 16px;
    font-size: 15px;
    font-family: inherit;
    color: #fff;
    min-width: 0;
    caret-color: var(--wmg-accent, var(--wmg-primary));
}

.wmg-field input::placeholder { color: rgba(255, 255, 255, .45); }

.wmg-field--split .wmg-at {
    display: flex;
    align-items: center;
    padding: 0 14px;
    color: rgba(255, 255, 255, .65);
    border-left: 1px solid rgba(255, 255, 255, .14);
    background: rgba(0, 0, 0, .15);
    font-size: 14px;
    user-select: none;
    white-space: nowrap;
    max-width: 55%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Remember ---------- */
.wmg-remember {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0 22px 4px;
    font-size: 13px;
    color: rgba(255, 255, 255, .8);
    cursor: pointer;
    user-select: none;
}

.wmg-remember input[type=checkbox] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1.5px solid rgba(255, 255, 255, .4);
    border-radius: 5px;
    background: rgba(255, 255, 255, .08);
    cursor: pointer;
    margin: 0;
    position: relative;
    transition: all .15s;
}

.wmg-remember input[type=checkbox]:checked {
    background: var(--wmg-accent, var(--wmg-primary));
    border-color: var(--wmg-accent, var(--wmg-primary));
}

.wmg-remember input[type=checkbox]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* ---------- Button ---------- */
.wmg-btn {
    width: 100%;
    background: var(--wmg-accent, var(--wmg-primary, #1976d2));
    color: #fff;
    border: 0;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: filter .15s, transform .05s, box-shadow .2s;
    box-shadow:
        0 6px 20px color-mix(in srgb, var(--wmg-accent, var(--wmg-primary)) 45%, transparent),
        0 1px 0 rgba(255, 255, 255, .15) inset;
}

.wmg-btn:hover {
    filter: brightness(1.1);
    box-shadow:
        0 8px 28px color-mix(in srgb, var(--wmg-accent, var(--wmg-primary)) 55%, transparent),
        0 1px 0 rgba(255, 255, 255, .2) inset;
}

.wmg-btn:active { transform: translateY(1px); }

.wmg-btn:focus-visible {
    outline: 0;
    box-shadow:
        0 0 0 3px color-mix(in srgb, var(--wmg-accent, var(--wmg-primary)) 40%, transparent),
        0 6px 20px color-mix(in srgb, var(--wmg-accent, var(--wmg-primary)) 45%, transparent);
}

.wmg-btn__arrow {
    width: 18px;
    height: 18px;
    transition: transform .2s;
}

.wmg-btn:hover .wmg-btn__arrow { transform: translateX(3px); }

/* ---------- Admin link ---------- */
.wmg-admin-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    color: rgba(255, 255, 255, .75);
    text-decoration: none;
    font-size: 13px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .04);
    transition: all .15s;
}

.wmg-admin-link svg {
    width: 14px;
    height: 14px;
}

.wmg-admin-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .22);
}

/* ---------- Footer ---------- */
.wmg-footer {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: 12px;
    color: rgba(255, 255, 255, .6);
    line-height: 1.6;
}

.wmg-footer a {
    color: rgba(255, 255, 255, .85);
    text-decoration: none;
    border-bottom: 1px dotted rgba(255, 255, 255, .35);
    transition: color .15s, border-color .15s;
}

.wmg-footer a:hover {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, .7);
}

/* ---------- Powered by ---------- */
.wmg-powered {
    position: absolute;
    bottom: 16px;
    right: 20px;
    color: rgba(255, 255, 255, .5);
    font-size: 11px;
    z-index: 1;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
    pointer-events: none;
    letter-spacing: .02em;
}

/* ---------- Responsive ---------- */
@media (max-width: 520px) {
    .wmg-card { padding: 32px 24px 26px; max-width: 100%; border-radius: 16px; }
    .wmg-brand { font-size: 22px; }
    .wmg-logo { max-width: 72px; max-height: 72px; }
    .wmg-logo--placeholder { width: 60px; height: 60px; font-size: 26px; }
}

/* Eski browser fallback — backdrop-filter desteklemiyorsa */
@supports not (backdrop-filter: blur(1px)) {
    .wmg-card {
        background: rgba(20, 24, 32, .85);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .wmg-btn, .wmg-btn__arrow, .wmg-field, .wmg-admin-link {
        transition: none;
    }
}