@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --background-color: #121212;
    --sidebar-bg: #1A1C1E;
    --main-bg: #232528;
    --primary-green: #00B14F;
    --text-primary: #FFFFFF;
    --text-secondary: #8A8F98;
    --border-color: #363A40;
    --input-bg: #2D3035;
    --slider-track: #3E424A;
    --stop-red: #F44336;
    --stop-red-hover: #d32f2f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

/* Light Theme */
body.light {
    --background-color: #f5f5f5;
    --sidebar-bg: #ffffff;
    --main-bg: #ffffff;
    --primary-green: #00B14F;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --border-color: #e0e0e0;
    --input-bg: #f8f9fa;
    --slider-track: #dee2e6;
    --stop-red: #dc3545;
    --stop-red-hover: #c82333;
}

body.light .container {
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid #e0e0e0;
}

body.light .sidebar {
    background-color: rgba(255, 255, 255, 0.9);
    border-right: 1px solid #e0e0e0;
}

body.light .modal-content {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
}

body.light .logs-container {
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    color: #1a1a1a;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.modal-content {
    background-color: #232528; /* Re-set solid background */
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 400px;
}

.modal-content .status-icon .fa-check-circle {
    font-size: 48px;
    color: var(--primary-green);
    margin-bottom: 20px;
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 24px;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.modal-button {
    background-color: var(--primary-green);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.modal-button:hover {
    background-color: #009942; /* A slightly darker green */
}

/* Logs Page Styles */
.logs-container {
    background-color: #1a1a1a;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    height: 50vh;
    overflow-y: auto;
    color: #e0e0e0;
}

#logs-content {
    font-family: 'SF Mono', 'Courier New', Courier, monospace;
    font-size: 14px;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
}

.container {
    display: flex;
    width: 1000px;
    height: auto;
    min-height: 650px;
    background-color: rgba(35, 37, 40, 0.75); /* Semi-transparent */
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.7);
    border: 1px solid var(--border-color);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
}

.sidebar {
    width: 250px;
    background-color: rgba(26, 28, 30, 0.7); /* Semi-transparent */
    padding: 20px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 40px;
}

.logo sup {
    font-size: 10px;
    color: #888;
    vertical-align: super;
}

.menu { display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }

.menu-item {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 15px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.menu-item.active {
    background-color: var(--primary-green);
    color: var(--text-primary);
}

.menu-item:not(.active):hover {
    color: var(--text-primary);
}

.user-profile-sidebar { margin-top: auto; }

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background-color: #2D3035;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.user-profile img { width: 40px; height: 40px; border-radius: 50%; }
.user-details { flex-grow: 1; }
.user-details #username { font-weight: 600; }
.premium-badge { color: var(--primary-green); font-size: 12px; font-weight: 500; }
.btn-logout { background: none; border: none; color: var(--text-secondary); cursor: pointer; font-size: 18px; }

.social-icons { display: flex; justify-content: center; gap: 20px; margin-top: 20px; }
.social-icons a { color: var(--text-secondary); font-size: 20px; }

.main-content { flex-grow: 1; padding: 30px; display: flex; flex-direction: column; }

.main-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.main-header h1 { font-size: 28px; font-weight: 600; }

.premium-plan {
    display: none; /* Hidden by default */
    align-items: center;
    gap: 15px;
    background-color: #2D3035;
    padding: 10px 15px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.premium-plan .fa-crown { color: var(--primary-green); font-size: 24px; }
.premium-plan span { font-weight: 600; }
.premium-plan small { color: var(--text-secondary); }

.viewbot-controls, .viewbot-status, .viewbot-success, #settings-page, #logs-page, #support-page {
    background-color: transparent;
    padding: 0;
    border: none;
    animation: fadeIn 0.5s ease-in-out;
}

.viewbot-success {
    text-align: center;
    padding: 50px;
}

.success-animation .check-mark {
    font-size: 5rem;
    color: var(--primary-green);
    animation: checkBounce 1s ease-in-out;
    margin-bottom: 20px;
}

.success-animation h2 {
    font-size: 24px;
    margin-bottom: 10px;
    animation: slideUp 0.5s 0.5s both;
}

.success-animation p {
    color: var(--text-secondary);
    animation: slideUp 0.5s 1s both;
}

@keyframes checkBounce {
    0% { transform: scale(0) rotate(0deg); }
    50% { transform: scale(1.2) rotate(180deg); }
    100% { transform: scale(1) rotate(360deg); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.control-group { margin-bottom: 25px; }
.control-group label { display: block; margin-bottom: 10px; font-weight: 500; color: var(--text-secondary); }
.control-group input[type="text"],
.control-group input[type="number"] {
    width: 100%;
    padding: 15px;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
}
.control-group input[type="text"]:focus,
.control-group input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-green);
}

.slider-group { display: flex; gap: 30px; margin-bottom: 25px; }
.slider-container { flex: 1; }
.slider-container label { display: block; margin-bottom: 10px; font-weight: 500; color: var(--text-secondary); }
.slider-container label i { margin-right: 8px; }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; background: var(--slider-track); border-radius: 5px; outline: none; }
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-green);
    cursor: pointer;
    border-radius: 50%;
}

.slider-value { float: right; color: var(--text-secondary); font-weight: 600; }

.start-button, .stop-button {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.start-button { background-color: #363A40; color: var(--text-secondary); }
.start-button:hover { background-color: #45a049; color: var(--text-primary); }

.btn-discord {
     padding: 10px 20px; border: none; border-radius: 8px; font-size: 1em; cursor: pointer;
     transition: all 0.3s ease; display: flex; align-items: center; gap: 10px; font-weight: 500;
     background-color: #5865F2; color: white; width: 100%; justify-content: center;
}

.viewbot-status { text-align: center; }

.status-grid {
    display: grid;
    grid-template-rows: auto auto auto auto;
    gap: 20px;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.status-main {
    text-align: center;
}

.status-icon .fa-check {
    font-size: 48px;
    color: var(--primary-green);
    margin-bottom: 15px;
    animation: checkBounce 1s ease-in-out;
}

.viewbot-status h2 {
    font-size: 28px;
    margin-bottom: 5px;
}

.viewbot-status p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

.status-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.metric-box {
    background-color: var(--input-bg);
    padding: 20px 15px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.metric-value {
    display: block;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
}

.metric-box small {
    color: var(--text-secondary);
    font-size: 12px;
}

.progress-container { margin-bottom: 20px; }
.progress-bar { background-color: var(--slider-track); border-radius: 5px; height: 12px; overflow: hidden; position: relative; }
.progress { background-color: var(--primary-green); height: 100%; border-radius: 5px; transition: width 0.5s ease-in-out; }

.stop-button { background-color: var(--stop-red); color: #fff; }
.stop-button:hover { background-color: var(--stop-red-hover); }

#settings-page { padding: 20px; }
.setting-option { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding: 15px; background-color: var(--input-bg); border-radius: 10px; }
.setting-option label { font-weight: 500; }
#theme-select { padding: 8px; border-radius: 5px; background-color: var(--slider-track); color: var(--text-primary); border: 1px solid var(--border-color); }
.switch { position: relative; display: inline-block; width: 60px; height: 34px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; }
.slider:before { position: absolute; content: ""; height: 26px; width: 26px; left: 4px; bottom: 4px; background-color: white; transition: .4s; }
input:checked + .slider { background-color: var(--primary-green); }
input:focus + .slider { box-shadow: 0 0 1px var(--primary-green); }
input:checked + .slider:before { transform: translateX(26px); }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }

/* Animated Background */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-green), transparent 70%);
    opacity: 0.3; /* Increased opacity */
    animation: move 25s infinite alternate;
}

.shape1 { width: 450px; height: 450px; top: -150px; left: -150px; animation-duration: 30s; }
.shape2 { width: 550px; height: 550px; bottom: -250px; right: -250px; animation-duration: 35s; }
.shape3 { width: 350px; height: 350px; bottom: 50%; right: 50%; transform: translate(50%, 50%); animation-duration: 20s; }
.shape4 { width: 250px; height: 250px; top: 10%; right: 10%; animation-duration: 40s; }
.shape5 { width: 200px; height: 200px; top: 60%; left: 15%; animation-duration: 28s; }

@keyframes move {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(150px, -100px) rotate(360deg); }
}


/* Page Transitions */
.page {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Support Page */
#support-page {
    text-align: center;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.support-content p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.btn-discord-support {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    background-color: #5865F2;
    color: white;
    text-decoration: none;
}

.btn-discord-support:hover {
    background-color: #4a54c9;
}

