@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
    --bg: #020617;
    --panel: #0b1220;
    --panel-soft: #111827;
    --border: #1f2937;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --accent: #6366f1;
    --green: #22c55e;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: radial-gradient(circle at top, #111827, #020617);
    color: var(--text);
	font-family: Inter, -apple-system, BlinkMacSystemFont,
                 "Segoe UI", "Segoe UI Emoji",
                 "Apple Color Emoji",
                 "Noto Color Emoji",
                 sans-serif;
}

.app {
    display: flex;
    height: 100vh;
    width: 100vw;
}

.sidebar {
    width: 240px;
    background: linear-gradient(180deg, #020617, #020617);
    border-right: 1px solid var(--border);
    padding: 24px 16px;
}

.logo {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 30px;
}

.nav-item {
    padding: 14px 18px;
    border-radius: 14px;
    cursor: pointer;
    color: var(--muted);
    margin-bottom: 10px;
    transition: .25s;
}

.nav-item:hover {
    background: rgba(99,102,241,.15);
    color: white;
}

.nav-item.active {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
    box-shadow: 0 8px 30px rgba(99,102,241,.4);
}

.main {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.content {
    display: none;
}

.content.active {
    display: block;
    animation: fade .4s ease;
}

.card {
    background: linear-gradient(180deg, #0b1220, #020617);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 28px;
    box-shadow: 0 20px 60px rgba(0,0,0,.6);
}

.table-card {
    padding: 0;
}

.refresh-cell {
    width: 40px;
    text-align: center;
}

.refresh-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--muted);
    transition: .25s ease;
}

.refresh-btn:hover {
    color: #fff;
    background: rgba(99,102,241,.25);
    transform: rotate(90deg);
}

.big-number {
    font-size: 48px;
    font-weight: 600;
    margin-top: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    text-align: left;
    font-weight: 500;
    color: var(--muted);
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}

tbody td {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}

.method-wrapper {
    position: relative;
    width: 180px;
}

.method-select {
    background: var(--panel-soft);
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    user-select: none;
    transition: .25s;
}

.method-select:hover {
    background: rgba(255,255,255,.06);
}

.method-tree {
    position: absolute;
    top: 120%;
    left: 0;
    width: 100%;
    background: #020617;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px) scale(.97);
    pointer-events: none;
    transition: .25s ease;
    z-index: 999;
}

.method-wrapper.open .method-tree {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.method-item {
    padding: 12px 14px;
    cursor: pointer;
    transition: .2s;
}

.method-item:hover {
    background: rgba(99,102,241,.18);
}


.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    line-height: 1;
}


.status.active {
    background: rgba(34,197,94,.15);
    color: var(--green);
}

.captcha-flag {
    font-size: 11px;
    opacity: .75;
}

.captcha-flag.on {
    color: #facc15;
}

.captcha-flag.off {
    color: #9ca3af;
}

.captcha-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 12px;
}

.captcha-toggle input {
    cursor: pointer;
}

.muted {
    color: var(--muted);
}

.flag {
	font-family: "Apple Color Emoji",
                 "Segoe UI Emoji",
                 "Noto Color Emoji",
                 sans-serif;
    font-size: 20px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
}

.flag img {
    width: 22px;
    height: 22px;
    vertical-align: middle;
}


.flag:hover {
    transform: scale(1.15);
    transition: .2s ease;
}


@keyframes fade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.refresh-btn.loading {
    animation: spin .8s linear infinite;
    pointer-events: none;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.shells-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.add-shell-btn {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    border: none;
    border-radius: 14px;
    padding: 10px 18px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: .25s;
}

.add-shell-btn:hover {
    box-shadow: 0 10px 30px rgba(99,102,241,.5);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal-overlay.open {
    display: flex;
}

.modal {
    background: linear-gradient(180deg, #0b1220, #020617);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    width: 420px;
    animation: modalIn .25s ease;
}

.modal textarea {
    width: 100%;
    height: 120px;
    background: #020617;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    color: var(--text);
    resize: none;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.modal-btn {
    padding: 10px 18px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
}

.modal-btn.primary {
    background: var(--accent);
    color: white;
}

.modal-btn.secondary {
    background: transparent;
    color: var(--muted);
}

@keyframes modalIn {
    from { transform: scale(.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.toast-container {
    position: fixed;
    right: 24px;
    bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 300;
}

.toast {
    background: linear-gradient(135deg, #0b1220, #020617);
    border: 1px solid var(--border);
    padding: 12px 16px;
    border-radius: 14px;
    color: white;
    min-width: 220px;
    animation: toastIn .25s ease, toastOut .25s ease 2s forwards;
}

@keyframes toastIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toastOut {
    to { transform: translateX(120%); opacity: 0; }
}


.settings-form {
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.settings-group label {
    font-size: 13px;
    color: var(--muted);
}

.settings-input,
.settings-select {
    background: linear-gradient(180deg, #0b1220, #020617);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: .25s ease;
}

.settings-input::placeholder {
    color: #6b7280;
}

.settings-input:focus,
.settings-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(99,102,241,.25);
}

.settings-select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #9ca3af 50%),
        linear-gradient(135deg, #9ca3af 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 4px),
        calc(100% - 12px) calc(50% - 4px);
    background-size: 6px 6px;
    background-repeat: no-repeat;
    cursor: pointer;
}

.settings-button {
    margin-top: 10px;
    align-self: flex-start;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    border: none;
    border-radius: 16px;
    padding: 14px 22px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: .25s ease;
    box-shadow: 0 12px 30px rgba(99,102,241,.45);
}

.settings-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 40px rgba(99,102,241,.6);
}

.settings-button:active {
    transform: translateY(0);
    box-shadow: 0 10px 25px rgba(99,102,241,.4);
}

.settings-method {
    position: relative;
    width: 100%;
}

.settings-method-select {
    background: linear-gradient(180deg, #0b1220, #020617);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    transition: .25s ease;
}

.settings-method-select:hover {
    border-color: var(--accent);
}

.settings-method-tree {
    position: absolute;
    top: 110%;
    left: 0;
    width: 100%;
    background: linear-gradient(180deg, #020617, #020617);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.6);
    opacity: 0;
    transform: translateY(-6px) scale(.98);
    pointer-events: none;
    transition: .25s ease;
    z-index: 50;
}

.settings-method.open .settings-method-tree {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.settings-method-item {
    padding: 14px 16px;
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

.settings-method-item:hover {
    background: rgba(99,102,241,.18);
    color: #fff;
}

.settings-method-item.active {
    background: rgba(99,102,241,.28);
    color: #fff;
}

#proxy table td:last-child {
    padding: 0; 
    vertical-align: middle;
	border-bottom: none;
}

.proxy-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 18px;
    gap: 12px;
    height: 64px;
    width: 100%;
}

#proxy table tbody tr {
    height: 64px;
    box-sizing: border-box;
	border-bottom: 1px solid var(--border);
}

.proxy-refresh {
    color: #3b82f6;
}

.proxy-delete {
    color: #ef4444;
}
.chance-input:focus {
    outline: none;
    border-color: var(--accent);
}

.captcha-switch {
    position: relative;
    width: 44px;
    height: 24px;
    display: inline-block;
}

.captcha-switch input {
    display: none;
}

.captcha-switch .switch {
    position: absolute;
    inset: 0;
    background: #020617;
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    transition: .25s ease;
}

.captcha-switch .switch::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--muted);
    border-radius: 50%;
    transition: .25s ease;
}

.captcha-switch input:checked + .switch {
    background: rgba(99,102,241,.25);
    border-color: var(--accent);
}

.captcha-switch input:checked + .switch::before {
    transform: translate(20px, -50%);
    background: var(--accent);
}

.center {
    text-align: center;
}

.visitors-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.visitors-count {
    min-width: 16px;
    font-size: 14px;
    line-height: 1;
    text-align: center;
}

.visitors-cell .refresh-btn {
    width: 22px;
    height: 22px;
    font-size: 13px;
}

.website {
    max-width: 360px;
    word-break: break-all;
}

.chance-input {
    width: 64px;
    text-align: center;
}

.status-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.chance-input {
    width: 64px;
    padding: 6px 10px;
    background: #020617;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    text-align: center;
    font-size: 14px;
    transition: .2s ease;
}

.chance-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(99,102,241,.25);
}

.chance-input.saved {
    border-color: #22c55e;
}

.chance-input.pending {
    border-color: #facc15;
}

.chance-input::-webkit-outer-spin-button,
.chance-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.chance-input {
    appearance: textfield;
}
