/**
 * Live Feed Styles
 */

/* CSS Variables - Brand Colors */
:root {
    --primary: #0092ca;          /* Blue */
    --primary-dark: #007bb5;
    --secondary: #f21368;         /* Pinkish */
    --dark: #181b1e;              /* Dark Blue */
    --dark-lighter: #2a2f33;
    --light: #f5fbff;             /* Light Blue */
    --gray: #5a6872;
    --gray-light: #e8f4fc;
    --success: #28a745;
    --danger: #dc3545;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Poppins', sans-serif;
    --font-mono: 'Consolas', 'Monaco', 'Courier New', monospace;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --radius: 8px;
    --radius-lg: 12px;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Base */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: white;
    color: var(--dark);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
    border-bottom: 3px solid var(--primary);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header .logo h1 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    letter-spacing: -0.5px;
}

.header .logo span {
    color: var(--dark);
    font-weight: 600;
}

/* Main */
.main {
    flex: 1;
    padding: 2rem 0;
}

/* Title Section */
.title-section {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem 0;
}

.title-section h2 {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    color: var(--dark);
    margin-bottom: 0.75rem;
}

.title-section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--secondary);
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

.title-section p {
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Code Section */
.code-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--primary);
}

.code-section h3 {
    font-family: var(--font-heading);
    margin-bottom: 1rem;
}

.password-note {
    background: var(--light);
    border: 1px solid var(--primary);
    border-left: 4px solid var(--secondary);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.password-note i {
    margin-right: 0.5rem;
}

/* Code Tabs */
.code-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: var(--gray-light);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: var(--primary);
    color: white;
}

.tab-btn.active {
    background: var(--primary);
    color: white;
}

/* Code Panels */
.code-panel {
    display: none;
}

.code-panel.active {
    display: block;
}

.code-panel pre {
    background: #1e1e1e;
    border-radius: var(--radius);
    padding: 1.5rem;
    overflow-x: auto;
    margin: 0;
}

.code-panel code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.5;
    color: #d4d4d4;
}

/* Syntax highlighting */
.code-panel .comment { color: #6a9955; }
.code-panel .keyword { color: #569cd6; }
.code-panel .string { color: #ce9178; }
.code-panel .number { color: #b5cea8; }
.code-panel .function { color: #dcdcaa; }
.code-panel .variable { color: #9cdcfe; }
.code-panel .param { color: #9cdcfe; }

.success-hint {
    margin-top: 1rem;
    color: var(--success);
    font-size: 0.9rem;
}

.success-hint i {
    margin-right: 0.5rem;
}

/* Controls Section */
.controls-section {
    margin-bottom: 1rem;
}

.controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.live-toggle {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.toggle-btn {
    background: var(--gray-light);
    border: 2px solid var(--gray);
    border-radius: 50px;
    padding: 0.5rem 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.toggle-btn .toggle-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gray);
    transition: all 0.3s;
}

.toggle-btn.active {
    background: var(--secondary);
    border-color: var(--secondary);
    color: white;
}

.toggle-btn.active .toggle-indicator {
    background: white;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    color: var(--gray);
    font-size: 0.9rem;
}

.refresh-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: var(--font-body);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s;
}

.refresh-btn:hover {
    background: var(--primary-dark);
}

/* Feed Section */
.feed-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow);
}

.feed-container {
    position: relative;
    width: 100%;
    padding-bottom: 75%;
    overflow: hidden;
    border-radius: var(--radius);
}

.feed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Footer */
.footer {
    background: var(--primary);
    color: white;
    padding: 1rem 0;
    text-align: center;
    font-size: 0.85rem;
}

.footer a {
    color: white;
    text-decoration: underline;
}

.footer a:hover {
    color: var(--light);
}

/* Responsive */
@media (max-width: 768px) {
    .title-section h2 {
        font-size: 1.5rem;
    }
    
    .code-section {
        padding: 1rem;
    }
    
    .code-panel pre {
        padding: 1rem;
    }
    
    .code-panel code {
        font-size: 0.75rem;
    }
    
    .controls-row {
        flex-direction: column;
        align-items: flex-start;
    }
}
