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

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --error-color: #ef4444;
    --background: #f8fafc;
    --card-background: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.top-header {
    background: var(--card-background);
    border-bottom: 2px solid var(--border-color);
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow);
}

.top-header h1 {
    font-size: 1.75rem;
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0 0 0.5rem 0;
}

.swagger-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.swagger-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.main-container {
    width: 100%;
    margin: 0;
    padding: 0;
}

.tab-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
    min-height: calc(100vh - 180px);
}

.demo-section {
    background: var(--background);
    padding: 2rem;
    border-radius: 8px;
}

.demo-section h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.help-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.code-section {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.code-section h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.reference-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

.ref-column h2 {
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
    background: var(--card-background);
    padding: 0;
    width: 100%;
}

.tab-button {
    background: none;
    border: none;
    padding: 0.75rem 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    flex: 1;
}

.tab-button:hover {
    color: var(--text-primary);
    background: var(--background);
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-section h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.contact-card {
    background: var(--card-background);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.contact-card h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.contact-card p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
}

.contact-card a {
    color: var(--primary-color);
    text-decoration: none;
}

.contact-card a:hover {
    text-decoration: underline;
}

.contact-card ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.contact-card li {
    margin: 0.25rem 0;
    color: var(--text-secondary);
}

.code-section pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.25rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 0;
}

.code-section code {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
}

.endpoint-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.endpoint-group h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.endpoint-group code {
    display: block;
    background: var(--background);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    border-left: 3px solid var(--primary-color);
}

.reference-links h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.ref-link {
    display: block;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s;
}

.ref-link:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.ref-link strong {
    display: block;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.ref-link span {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.quick-ref {
    background: var(--background);
    border-radius: 6px;
}

.quick-ref p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.quick-ref code {
    background: var(--card-background);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.85rem;
    color: var(--primary-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

input[type="text"],
input[type="password"],
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

select:disabled {
    background-color: var(--background);
    cursor: not-allowed;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.5rem;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background: #475569;
}

.status {
    display: inline-block;
    margin-left: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status.success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success-color);
}

.status.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

.videos-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.video-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--background);
}

.video-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.video-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.video-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.video-card .duration {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.placeholder {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
    font-style: italic;
}

.video-container {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin: 1rem 0;
}

.video-container video {
    width: 100%;
    height: auto;
    min-height: 400px;
}

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

.video-info {
    padding: 1rem;
    background: var(--background);
    border-radius: 6px;
    margin-bottom: 1rem;
}

.video-info h3 {
    margin-bottom: 0.5rem;
}

.video-info p {
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.video-description {
    margin: 1rem 0;
    line-height: 1.6;
}

.video-description p {
    margin-bottom: 0.5rem;
}

.video-description a {
    color: var(--primary-color);
    text-decoration: none;
}

.video-description a:hover {
    text-decoration: underline;
}


/* Responsive Design */
@media (max-width: 1200px) {
    .tab-layout {
        grid-template-columns: 1fr;
    }

    .reference-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .tabs {
        padding: 0 1rem;
        overflow-x: auto;
    }

    .tab-button {
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    .top-header {
        padding: 1rem;
    }

    .top-header h1 {
        font-size: 1.5rem;
    }

    .tab-layout {
        padding: 1rem;
    }

    .demo-section, .code-section {
        padding: 1rem;
    }

    .videos-list {
        grid-template-columns: 1fr;
    }
}

/* Shaka Player Custom Styling */
.shaka-video-container {
    border-radius: 8px;
    overflow: hidden;
}

.shaka-controls-button-panel {
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

