:root {
    --bg-dark: #090a0f;
    --card-bg: rgba(22, 26, 38, 0.75);
    --glass-border: rgba(255, 255, 255, 0.08);
    --accent: #5865f2;
    --accent-hover: #4752c4;
    --success: #2dc770;
    --danger: #f23f43;
    --text-main: #f2f3f5;
    --text-sub: #949ba4;
    --dropdown-bg: #161922;
    --radius: 14px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
}

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

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

body {
    background: radial-gradient(circle at top right, #1a1d2d, #090a0f 80%);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

.glass {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
}

.app-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2.5rem;
    margin: 1rem 2rem 0 2rem;
    border-radius: 16px;
    flex-shrink: 0;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-badge {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #5865f2, #9900ff);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4);
}

.logo-title {
    font-size: 1.2rem;
    font-weight: 600;
    background: linear-gradient(to right, #ffffff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-wrapper {
    flex: 1;
    padding: 1.5rem 2rem;
    overflow: hidden;
}

.hero-card {
    max-width: 520px;
    margin: 6rem auto;
    padding: 3rem 2rem;
    text-align: center;
}

.hero-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1.5rem;
    height: calc(100vh - 120px);
}

.sidebar-panel {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    gap: 1.25rem;
}

.server-selector-card {
    background: rgba(0, 0, 0, 0.25);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.sidebar-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-sub);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.6rem;
}

.select-server-dropdown {
    font-weight: 600;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    color: var(--text-sub);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.sidebar-btn:hover, .sidebar-btn.active {
    background: rgba(88, 101, 242, 0.2);
    border-color: rgba(88, 101, 242, 0.5);
    color: white;
    transform: translateX(3px);
}

.workspace {
    padding: 2rem;
    overflow-y: auto;
    height: 100%;
}

.workspace-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-sub);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.workspace-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 1.5rem;
}

.sub-text {
    color: var(--text-sub);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.topbar-actions {
    display: flex;
    gap: 0.8rem;
}

.btn {
    padding: 0.75rem 1.4rem;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-glow {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 20px rgba(88, 101, 242, 0.4);
    text-decoration: none;
    display: inline-block;
}

.btn-glow:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-save {
    background: var(--success);
    color: white;
}

.btn-save:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-deploy {
    background: var(--accent);
    color: white;
}

.btn-add {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.btn-add:hover {
    background: rgba(255, 255, 255, 0.15);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.split-view-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1.5rem;
}

.panel-section {
    background: rgba(0, 0, 0, 0.25);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    margin-bottom: 1.25rem;
}

.section-heading {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #a5b4fc;
}

.section-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-sub);
    margin-bottom: 0.4rem;
}

.input-glass {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #12141d;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #f2f3f5;
    outline: none;
    font-size: 0.95rem;
    appearance: none;
    -webkit-appearance: none;
}

select.input-glass {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23949ba4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5rem;
    cursor: pointer;
}

.input-glass option {
    background-color: var(--dropdown-bg);
    color: #f2f3f5;
    padding: 10px;
}

.input-glass:focus {
    border-color: var(--accent);
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.input-color-picker {
    width: 100%;
    height: 42px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
}

.buttons-stack {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.button-row-item {
    display: grid;
    grid-template-columns: 1fr 1fr 120px 40px;
    gap: 0.8rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.75rem;
    border-radius: 8px;
}

.question-row-item {
    display: grid;
    grid-template-columns: 1fr 1fr 110px 40px;
    gap: 0.8rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.75rem;
    border-radius: 8px;
}

.embed-button-row {
    display: grid;
    grid-template-columns: 1fr 1fr 120px 1fr 1fr 40px;
    gap: 0.8rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.75rem;
    border-radius: 8px;
}

.join-role-row {
    display: grid;
    grid-template-columns: 1fr 40px;
    gap: 0.8rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.75rem;
    border-radius: 8px;
}

.btn-remove {
    background: var(--danger);
    color: white;
    border: none;
    padding: 0.6rem;
    border-radius: 6px;
    cursor: pointer;
}

.preview-side {
    position: sticky;
    top: 0;
    height: fit-content;
}

.discord-preview-box {
    background: #2b2d31;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.preview-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #949ba4;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.discord-message {
    background: #313338;
    padding: 1rem;
    border-radius: 8px;
}

.discord-embed {
    position: relative;
    background: #2b2d31;
    border-radius: 4px;
    padding: 0.8rem 1rem;
    display: flex;
    gap: 1rem;
}

.discord-embed-color {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
}

.discord-embed-content {
    flex: 1;
}

.discord-embed-title {
    font-weight: 700;
    color: white;
    margin-bottom: 0.4rem;
    word-break: break-word;
}

.discord-embed-desc {
    font-size: 0.9rem;
    color: #dbdee1;
    margin-bottom: 0.6rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.discord-embed-footer {
    font-size: 0.75rem;
    color: #949ba4;
}

.discord-embed-thumb {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    object-fit: cover;
}

.discord-buttons-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.preview-discord-btn {
    padding: 0.45rem 0.9rem;
    border-radius: 3px;
    font-size: 0.85rem;
    color: white;
    border: none;
    font-weight: 500;
}

.saved-embeds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.saved-embed-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.saved-embed-title {
    font-weight: 700;
    color: white;
}

.margin-top-1 {
    margin-top: 1rem;
}

.margin-top-2 {
    margin-top: 2rem;
}

.notification-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    background: var(--card-bg);
    border: 1px solid var(--accent);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: slideUp 0.3s ease;
}

.hidden {
    display: none !important;
}

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

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