@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

:root {
    --bg-color: #18191a;
    --panel-color: #232426;
    --accent-start: #3e618d;
    --accent-end: #a960ee;
    --text-color: #f3f3f3;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    margin: 0;
    line-height: 1.45;
}

.container {
    max-width: 900px;
    margin: 50px auto;
    background: var(--panel-color);
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
    padding: 36px 40px 32px 40px;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.status-indicator {
    background: #24292f;
    padding: 4px 12px;
    border-radius: 18px;
    font-size: 0.85em;
    letter-spacing: 0.01em;
    color: #b9fbc0;
    margin-left: 6px;
    vertical-align: middle;
}
.status-indicator.warn { color: #ffd500; }
.status-indicator.error { color: #ff6565; }
.status-indicator.ok { color: #b9fbc0; }

.settings-link {
    color: #b9fbc0;
    margin-left: 12px;
    text-decoration: none;
    font-size: 1.2em;
}
.settings-link:hover { color: #fff; }

main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

@media (max-width: 700px) {
    main {
        grid-template-columns: 1fr;
    }
}

.file-upload h2 {
    font-size: 1.14em;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 7px;
}

.icon {
    font-size: 1.3em;
    vertical-align: middle;
}

form {
    margin-bottom: 16px;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.settings-grid fieldset {
    grid-column: 1 / -1;
}

.settings-grid > div {
    display: grid;
    grid-template-columns: 180px 1fr;
    align-items: center;
    gap: 10px;
    border: 1px solid #444;
    padding: 12px;
    border-radius: 8px;
}

.settings-grid > div.single {
    grid-template-columns: 1fr;
}

.settings-grid fieldset > div {
    display: grid;
    grid-template-columns: 180px 1fr;
    align-items: center;
    gap: 10px;
}

.settings-grid fieldset > div textarea {
    grid-column: 1 / span 2;
}

input[type=text], input[type=password], select, textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 8px;
    border: none;
    background: #2d2d2d;
    color: #f3f3f3;
    margin-bottom: 14px;
    font-size: 1em;
}

textarea {
    min-height: 80px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
    margin-right: 8px;
}
.switch input {display:none;}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #666;
    border-radius: 22px;
    transition: .2s;
}
.slider:before {
    position: absolute;
    content: '';
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: .2s;
}
.switch input:checked + .slider {
    background: #3e618d;
}
.switch input:checked + .slider:before {
    transform: translateX(20px);
}

.toggle-label {
    vertical-align: middle;
    margin-right: 6px;
}

.state-label {
    margin-left: 6px;
    margin-right: 6px;
    font-size: 0.9em;
    opacity: 0.8;
}
.description {
    font-size: 0.85em;
    opacity: 0.75;
    margin-top: -6px;
    margin-bottom: 12px;
}

ul.messages {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

ul.messages li {
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #2d2d2d;
}

ul.messages li.error {
    background: #a33434;
    color: #fff;
}

ul.messages li.success {
    background: #2e6a90;
    color: #fff;
}

p.error {
    color: #ff6565;
    margin-top: -8px;
    margin-bottom: 12px;
}

.file-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.file-list li {
    background: #222;
    margin-bottom: 8px;
    padding: 10px 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.file-list li.empty {
    opacity: 0.7;
    font-style: italic;
    text-align: center;
}

.filename {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
    display: inline-block;
}

.btn {
    background: #24292f;
    color: #b9fbc0;
    border: none;
    border-radius: 9px;
    padding: 8px 18px;
    cursor: pointer;
    font-size: 0.95em;
    transition: background 0.15s, color 0.15s, box-shadow 0.18s;
}

.btn.upload {
    background: #2e6a90;
    color: #fff;
}

.btn.remove {
    background: #a33434;
    color: #fff;
    font-size: 1.12em;
    padding: 6px 13px;
}

.btn.upload:hover,
.btn.remove:hover,
.btn:hover {
    filter: brightness(1.12);
    box-shadow: 0 2px 8px rgba(80,150,255,0.11);
}

.btn.main-action {
    margin-top: 32px;
    width: 100%;
    font-size: 1.13em;
    padding: 14px 0;
    background: linear-gradient(90deg,var(--accent-start),var(--accent-end));
    color: #fff;
    border-radius: 14px;
    font-weight: 700;
    box-shadow: 0 2px 16px rgba(100,30,240,0.08);
}

.btn.main-action:hover {
    filter: brightness(1.08);
}

.btn.main-action:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

footer {
    margin-top: 48px;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: var(--panel-color);
    padding: 20px;
    border-radius: 12px;
    width: 300px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.modal-actions .btn {
    flex: 1;
}
