/*
 * tmp0.cc shared styles.
 *
 * Everything here was previously duplicated inline in every template. Keep
 * page-specific rules in the page's own <style> block; anything used by three
 * or more pages belongs here.
 */

/* ---------- Page shell ---------- */

html {
    background-color: #0a0a0a;
}

body {
    background: linear-gradient(135deg, #0a0a0a 0%, #111111 50%, #0d0d0d 100%);
    min-height: 100vh;
    min-height: 100dvh; /* dynamic viewport height for mobile browser chrome */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

.dot-bg {
    background-image: radial-gradient(rgba(255, 255, 255, 0.8) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* ---------- Surfaces ---------- */

.glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.glow-subtle {
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.03);
}

/* ---------- Form controls ---------- */

.input-modern {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.input-modern:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    outline: none;
}

.input-modern::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

select option {
    background-color: #1a1a1a;
    color: #fff;
}

select optgroup {
    background-color: #111;
    color: #888;
    font-weight: 600;
    font-style: normal;
}

/* ---------- Buttons ---------- */

.btn-primary {
    background: linear-gradient(135deg, #ffffff 0%, #e5e5e5 100%);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.15);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ---------- Motion ---------- */

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.copy-success {
    animation: copyPop 0.3s ease-out;
}

@keyframes copyPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.click-effect {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    animation: clickRipple 0.4s ease-out forwards;
}

@keyframes clickRipple {
    0% { opacity: 0.3; transform: translate(-50%, -50%) scale(0); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(2.5); }
}

/* ---------- Upload widgets ---------- */

.w-initial {
    width: 0%;
}

.strength-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.strength-weak { background-color: #ef4444; }
.strength-medium { background-color: #eab308; }
.strength-strong { background-color: #22c55e; }

.drop-zone-active {
    border: 2px dashed rgba(255, 255, 255, 0.3);
    animation: dropPulse 1s ease-in-out infinite;
}

@keyframes dropPulse {
    0%, 100% { border-color: rgba(255, 255, 255, 0.2); }
    50% { border-color: rgba(255, 255, 255, 0.5); }
}

/* ---------- Scrollbars ---------- */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

::-webkit-scrollbar-corner {
    background: transparent;
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.modal-scroll {
    scrollbar-gutter: stable;
}

.modal-scroll::-webkit-scrollbar {
    width: 8px;
}

.modal-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
    margin: 8px 0;
}

.modal-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.modal-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
    background-clip: padding-box;
}

@media (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 4px;
        height: 4px;
    }

    .modal-scroll::-webkit-scrollbar {
        width: 4px;
    }
}

/* ---------- Modal chrome (shared fragment) ---------- */

.sharex-tab {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.45);
}

.sharex-tab:hover {
    color: rgba(255, 255, 255, 0.75);
}

.sharex-tab.active {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
}
