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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #e8e8e8;
    padding: 2rem;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, #00d9ff, #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header p {
    color: #a0a0a0;
    font-size: 1rem;
}

.back-link {
    display: inline-block;
    margin-top: 1rem;
    color: #00d9ff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: #00ff88;
}

.scraper-form {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #c0c0c0;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #00d9ff;
}

.form-group input::placeholder {
    color: #666;
}

button {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a2e;
    background: linear-gradient(90deg, #00d9ff, #00ff88);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

button:hover {
    opacity: 0.9;
}

button:active {
    transform: scale(0.98);
}

.error-box {
    background: rgba(255, 80, 80, 0.15);
    border: 1px solid rgba(255, 80, 80, 0.4);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    color: #ff6b6b;
    margin-bottom: 1rem;
}

.error-box a {
    color: #00d9ff;
    text-decoration: underline;
}

.result-header {
    margin-bottom: 1rem;
}

.result-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #00ff88;
    word-break: break-all;
    margin-bottom: 0.25rem;
}

.result-header .meta {
    font-size: 0.85rem;
    color: #888;
}

.stream-url-box {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.stream-url-box label {
    display: block;
    font-weight: 600;
    color: #00ff88;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.stream-url-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.stream-url-row input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    font-family: monospace;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
}

.stream-url-row button {
    flex: none;
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
    background: #00ff88;
    color: #1a1a2e;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
}

.stream-url-row button:hover {
    opacity: 0.9;
}

.stream-link {
    color: #00d9ff;
    font-size: 0.9rem;
    text-decoration: none;
}

.stream-link:hover {
    text-decoration: underline;
}

.stream-url-msg {
    color: #888;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.html-output {
    background: #0d1117;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.html-output pre {
    margin: 0;
    padding: 1.25rem;
    overflow-x: auto;
    max-height: 70vh;
    overflow-y: auto;
    font-size: 12px !important;
}

.html-output code,
.html-output pre code,
.html-output code[class*="language-"],
.html-output pre code[class*="language-"],
.html-output .token {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
    font-size: 12px !important;
    line-height: 1.5;
    color: #c9d1d9;
    white-space: pre-wrap;
    word-break: break-all;
}
