/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: #f5f8fa;
    color: #14171a;
}
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}
.header {
    background: white;
    border-bottom: 1px solid #e6ecf0;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}
.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1da1f2;
    text-decoration: none;
}
.nav a {
    margin-left: 15px;
    text-decoration: none;
    color: #657786;
}
.nav a:hover {
    color: #1da1f2;
}
.card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e6ecf0;
    margin-bottom: 15px;
    padding: 15px;
}
.stream-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 8px;
}
.stream-meta {
    color: #657786;
    font-size: 0.85rem;
    margin-bottom: 12px;
}
.stream-preview {
    border: 1px solid #e6ecf0;
    border-radius: 8px;
    padding: 10px;
    background: #fafbfc;
    height: auto;
    overflow: auto;
}
.btn {
    display: inline-block;
    background: #1da1f2;
    color: white;
    padding: 8px 16px;
    border-radius: 9999px;
    text-decoration: none;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
}
.btn-outline {
    background: transparent;
    border: 1px solid #1da1f2;
    color: #1da1f2;
}
.btn-danger {
    background: #e0245e;
}
form {
    margin-top: 10px;
}
input, textarea {
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    border: 1px solid #e6ecf0;
    border-radius: 8px;
}
textarea {
    min-height: 300px;
    font-family: monospace;
}
label {
    font-weight: bold;
}
.error {
    color: #e0245e;
    margin-bottom: 10px;
}
.success {
    color: #17bf63;
}


/* Dark mode styles */
body.dark-mode {
    background: #15202b;
    color: #e1e8ed;
}
body.dark-mode .header {
    background: #1e2a36;
    border-bottom-color: #2c3e50;
}
body.dark-mode .card {
    background: #1e2a36;
    border-color: #2c3e50;
}
body.dark-mode .btn {
    background: #1da1f2;
}
body.dark-mode .btn-outline {
    border-color: #1da1f2;
    color: #1da1f2;
}
body.dark-mode input, body.dark-mode textarea {
    background: #253341;
    border-color: #38444d;
    color: #e1e8ed;
}
body.dark-mode .stream-preview iframe {
    background: #1e2a36 !important;
    border-color: #38444d !important;
}

/* Sidebar layout */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.main-wrapper {
    display: flex;
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 20px;
    gap: 20px;
}
.sidebar-left, .sidebar-right {
    flex: 0 0 260px;
}
.content-main {
    flex: 1;
    min-width: 0;
}
@media (max-width: 900px) {
    .sidebar-left, .sidebar-right {
        display: none;
    }
    .main-wrapper {
        padding: 10px;
    }
}

/* Library cards */
.lib-card {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #e6ecf0;
    transition: transform 0.1s ease;
}
body.dark-mode .lib-card {
    background: #253341;
    border-color: #38444d;
}
.lib-card h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
}
.lib-card p {
    margin: 4px 0;
    font-size: 0.85rem;
}
.lib-card .download-btn {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 10px;
    font-size: 0.8rem;
}

/* Widget loader */
.widget-loader {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 12px;
    border: 1px solid #e6ecf0;
}
body.dark-mode .widget-loader {
    background: #253341;
    border-color: #38444d;
}
.widget-display {
    margin-top: 15px;
    border: 1px solid #e6ecf0;
    border-radius: 8px;
    background: white;
    overflow: hidden;
}
body.dark-mode .widget-display {
    background: #1e2a36;
    border-color: #38444d;
}
.widget-display iframe {
    width: 100%;
    height: 400px;
    border: none;
}
