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

:root {
    --bg-dark: #070b13;
    --card-bg: rgba(13, 22, 38, 0.6);
    --border-color: rgba(255, 255, 255, 0.07);
    --border-hover: rgba(0, 242, 254, 0.4);
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --accent-cyan: #00f2fe;
    --accent-violet: #4facfe;
    --accent-glow: rgba(0, 242, 254, 0.15);
    --danger: #ff5e62;
    --danger-glow: rgba(255, 94, 98, 0.15);
    --success: #00f2fe;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Background animated blur elements */
.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.15;
    animation: float 20s infinite alternate;
}

.bg-sphere-1 {
    top: -10%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
}

.bg-sphere-2 {
    bottom: -10%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--accent-violet) 0%, transparent 70%);
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 5%) scale(1.1); }
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px;
    flex: 1;
}

/* Premium Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-violet) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 16px;
    border-radius: 40px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--accent-cyan);
}

.username {
    font-size: 0.95rem;
    font-weight: 600;
}

.role-badge {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.2) 0%, rgba(79, 172, 254, 0.2) 100%);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
}

.logout-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px;
    transition: color 0.2s, transform 0.2s;
}

.logout-btn:hover {
    color: var(--danger);
    transform: scale(1.1);
}

/* Glassmorphic Grid Layout */
.grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 30px;
}

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

.card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s, border-color 0.3s;
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.card-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-icon {
    color: var(--accent-cyan);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-control {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-control:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-glow);
}

textarea.input-control {
    min-height: 120px;
    resize: vertical;
}

/* Drag and Drop File Uploader */
.dropzone {
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--accent-cyan);
    background: rgba(0, 242, 254, 0.02);
    box-shadow: inset 0 0 20px rgba(0, 242, 254, 0.03);
}

.dropzone-icon {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-violet) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dropzone-text {
    font-size: 0.95rem;
    font-weight: 500;
}

.dropzone-sub {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.file-selected-box {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--accent-cyan);
    padding: 12px;
    border-radius: 12px;
    display: none;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.file-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.file-remove {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 1rem;
}

/* Upload Progress Bar */
.progress-container {
    width: 100%;
    margin-bottom: 20px;
    display: none;
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-violet));
    border-radius: 10px;
    transition: width 0.1s ease-out;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 5px;
    font-weight: 600;
}

/* Custom Checkbox/Switch */
.switch-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.15);
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.switch-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent-cyan);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--accent-cyan);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* Premium Buttons */
.btn {
    width: 100%;
    padding: 14px 24px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-violet) 100%);
    color: #030708;
    box-shadow: 0 8px 24px rgba(0, 242, 254, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 242, 254, 0.4);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Live configuration card */
.live-badge {
    background: rgba(0, 242, 254, 0.1);
    color: var(--accent-cyan);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid rgba(0, 242, 254, 0.2);
    display: inline-block;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.live-info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.live-info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

.info-value {
    font-weight: 600;
    font-size: 0.9rem;
    max-width: 65%;
    word-break: break-all;
    text-align: right;
}

.info-value a {
    color: var(--accent-cyan);
    text-decoration: none;
}

.info-value a:hover {
    text-decoration: underline;
}

.notes-preview {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: 12px;
    margin-top: 15px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #e2e8f0;
    word-break: break-word;
}

/* History list */
.history-section {
    margin-top: 40px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.history-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease-in-out;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-hover);
}

.history-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-width: 70%;
}

.history-ver {
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.history-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.history-notes {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 3px;
}

.history-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.2s;
    font-family: inherit;
}

.action-btn-rollback {
    background: rgba(0, 242, 254, 0.05);
    border-color: rgba(0, 242, 254, 0.2);
    color: var(--accent-cyan);
}

.action-btn-rollback:hover {
    background: var(--accent-cyan);
    color: #030708;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}

.action-btn-delete {
    background: rgba(255, 94, 98, 0.05);
    border-color: rgba(255, 94, 98, 0.2);
    color: var(--danger);
}

.action-btn-delete:hover {
    background: var(--danger);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(255, 94, 98, 0.3);
}

/* Auth blocking overlay page */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    text-align: center;
    max-width: 450px;
    width: 100%;
}

.auth-logo {
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-violet) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
}

.auth-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 30px;
}

.discord-icon {
    font-size: 1.3rem;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: rgba(13, 22, 38, 0.95);
    border: 1px solid var(--accent-cyan);
    backdrop-filter: blur(10px);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.error {
    border-color: var(--danger);
}

.toast-icon {
    font-size: 1.2rem;
}

.toast-icon.success { color: var(--accent-cyan); }
.toast-icon.error { color: var(--danger); }

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
}
