@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@700&family=Share+Tech+Mono&display=swap');

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

body {
    font-family: 'Share Tech Mono', monospace;
    background: #1a1a1a;
    background-image:
        linear-gradient(rgba(26, 26, 26, 0.95), rgba(26, 26, 26, 0.95)),
        repeating-linear-gradient(0deg, transparent, transparent 2px, #222 2px, #222 4px);
    min-height: 100vh;
    color: #e0e0e0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: #fff;
}

header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    color: #00ffcc;
    text-shadow: 0 0 5px #00ffcc, 0 0 10px #00ffcc, 0 0 20px #00b38f, 2px 2px 2px rgba(0,0,0,0.5);
    margin-bottom: 10px;
}

header p {
    font-size: 1.2rem;
    color: #aaa;
    letter-spacing: 2px;
}

.creator-interface {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 40px;
    background: rgba(10, 10, 10, 0.5);
    border: 2px solid #333;
    border-radius: 0;
    padding: 30px;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.7);
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: bold;
    margin-bottom: 8px;
    color: #00ffcc;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input,
.form-group select {
    padding: 12px;
    border: 2px solid #333;
    border-radius: 0;
    font-size: 16px;
    background: #111;
    color: #e0e0e0;
    font-family: 'Share Tech Mono', monospace;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #00ffcc;
    box-shadow: 0 0 10px #00ffcc33;
}

.generate-btn {
    padding: 15px 30px;
    background: #d90429;
    color: white;
    border: 2px solid #ff3055;
    border-radius: 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 5px #fff;
    box-shadow: 0 0 10px #d90429, inset 0 0 10px rgba(255, 100, 125, 0.5);
}

.generate-btn:hover {
    transform: translateY(-2px);
    background: #ef233c;
    box-shadow: 0 5px 15px rgba(239, 35, 60, 0.4), 0 0 20px #d90429;
}

.generate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    background: #5c0010;
    border-color: #8c0c1e;
    box-shadow: none;
}

.preview-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.tv-bezel {
    background: #111;
    padding: 20px 20px 60px 20px;
    border: 2px solid #333;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 0 15px rgba(0,0,0,0.8);
    position: relative;
    width: 100%;
}

.tv-bezel::after {
    content: 'A.I. BROADCAST SYSTEM // MODEL: PSA-2000';
    position: absolute;
    bottom: 20px;
    left: 20px;
    font-family: 'Share Tech Mono', monospace;
    color: #777;
    font-size: 14px;
}

#psaCanvas {
    border: none;
    border-radius: 0;
    background: #000;
    max-width: 100%;
    height: auto;
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.3), inset 0 0 15px rgba(0, 255, 204, 0.2);
    image-rendering: pixelated;
}

.controls {
    display: flex;
    gap: 15px;
    width: 100%;
    justify-content: center;
}

.control-btn {
    flex-grow: 1;
    max-width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: #2a2a2a;
    color: white;
    border: 2px solid #444;
    border-radius: 0;
    cursor: pointer;
    font-family: 'Share Tech Mono', monospace;
    text-transform: uppercase;
    transition: all 0.3s;
}

.control-btn:hover:not(:disabled) {
    background: #333;
    border-color: #00ffcc;
    color: #00ffcc;
    box-shadow: 0 0 10px #00ffcc55;
}

.control-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: #333;
    background: #222;
}

.icon {
    display: inline-block;
    width: 12px;
    height: 12px;
}

.icon.play {
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 12px solid currentColor;
}

.icon.pause {
    width: 10px;
    height: 12px;
    border-left: 4px solid currentColor;
    border-right: 4px solid currentColor;
}

.icon.download {
    width: 12px;
    height: 6px;
    border-bottom: 2px solid currentColor;
    border-left: 2px solid currentColor;
    border-right: 2px solid currentColor;
    position: relative;
}
.icon.download::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 8px;
    background: currentColor;
}
.icon.download::after {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-top: 4px solid currentColor;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #222;
    border: 1px solid #444;
    border-radius: 0;
    overflow: hidden;
    padding: 1px;
}

.progress-fill {
    height: 100%;
    background: #00ffcc;
    width: 0%;
    transition: width 0.3s;
    box-shadow: 0 0 5px #00ffcc;
}

.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.9);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: white;
    z-index: 1000;
}

.loading.show {
    display: flex;
}

.spinner {
    width: 20px;
    height: 30px;
    background: #00ffcc;
    border: none;
    border-radius: 0;
    animation: blink 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

.loading p {
    font-size: 1.2rem;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 3px;
    color: #00ffcc;
    text-shadow: 0 0 5px #00ffcc;
}

.community-feed {
    max-width: 1400px;
    margin: 40px auto 0;
    padding: 20px;
    background: rgba(10, 10, 10, 0.7);
    border: 2px solid #333;
    border-top: 4px solid #00ffcc;
}

.feed-header {
    text-align: center;
    margin-bottom: 30px;
    color: #fff;
    border-bottom: 2px solid #333;
    padding-bottom: 20px;
}

.feed-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    color: #00ffcc;
    text-shadow: 0 0 5px #00ffcc, 0 0 10px #00ffcc;
    margin-bottom: 10px;
}

.feed-header p {
    font-size: 1rem;
    color: #aaa;
    letter-spacing: 1px;
}

.publish-section {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(0, 255, 204, 0.1);
    border: 2px solid #00ffcc;
    border-radius: 0;
}

.publish-form {
    display: flex;
    gap: 15px;
    align-items: center;
}

.publish-form input {
    flex: 1;
    padding: 12px;
    border: 2px solid #333;
    border-radius: 0;
    font-size: 16px;
    background: #111;
    color: #e0e0e0;
    font-family: 'Share Tech Mono', monospace;
    transition: all 0.3s;
}

.publish-form input:focus {
    outline: none;
    border-color: #00ffcc;
    box-shadow: 0 0 10px #00ffcc33;
}

.publish-btn {
    padding: 12px 24px;
    background: #00ffcc;
    color: #000;
    border: 2px solid #00ffcc;
    border-radius: 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.publish-btn:hover {
    background: #00b38f;
    border-color: #00b38f;
    box-shadow: 0 0 10px #00ffcc55;
}

.publish-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #333;
    border-color: #555;
    color: #777;
}

.feed-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.feed-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px;
    color: #aaa;
}

.feed-loading .spinner {
    width: 16px;
    height: 24px;
    background: #00ffcc;
    margin-bottom: 15px;
}

.feed-item {
    background: #111;
    border: 2px solid #333;
    border-radius: 0;
    padding: 15px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.feed-item:hover {
    border-color: #00ffcc;
    box-shadow: 0 0 15px #00ffcc33;
}

.feed-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00ffcc, #00b38f);
}

.feed-item-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    color: #00ffcc;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.feed-item-meta {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.feed-item-topic {
    color: #aaa;
    font-style: italic;
}

.feed-item-timestamp {
    font-size: 0.8rem;
    color: #555;
}

.feed-item-video {
    width: 100%;
    height: 200px;
    background: #000;
    border: 1px solid #333;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9rem;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
}

.feed-item-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Video.js custom styling */
.feed-item-video .video-js {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 0;
}

.feed-item-video .video-js .vjs-control-bar {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 0;
}

.feed-item-video .video-js .vjs-play-progress {
    background: #00ffcc;
}

.feed-item-video .video-js .vjs-volume-level {
    background: #00ffcc;
}

.feed-item-video .video-js .vjs-big-play-button {
    background: rgba(0, 255, 204, 0.8);
    border: 2px solid #00ffcc;
    border-radius: 0;
    color: #000;
    font-weight: bold;
}

.feed-item-video .video-js .vjs-big-play-button:hover {
    background: #00ffcc;
    border-color: #00b38f;
}

.feed-item-video .video-js .vjs-button > .vjs-icon-placeholder:before {
    color: #00ffcc;
}

.feed-item-video .video-js .vjs-slider {
    background: #333;
}

.feed-item-actions {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
}

.feed-item-stats {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #777;
}

.feed-item-download {
    padding: 6px 12px;
    background: #2a2a2a;
    color: #aaa;
    border: 1px solid #444;
    border-radius: 0;
    cursor: pointer;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    text-transform: uppercase;
    transition: all 0.3s;
}

.feed-item-download:hover {
    background: #333;
    border-color: #00ffcc;
    color: #00ffcc;
}

@media (max-width: 900px) {
    .creator-interface {
        grid-template-columns: 1fr;
    }
    header h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .creator-interface {
        grid-template-columns: 1fr;
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .container {
        padding: 10px;
    }

    .tv-bezel {
        padding: 10px 10px 40px 10px;
    }

    .tv-bezel::after {
        font-size: 10px;
        left: 10px;
        bottom: 10px;
    }

    .controls {
        flex-direction: column;
        gap: 8px;
    }

    .control-btn {
        max-width: 100%;
    }

    .publish-form {
        flex-direction: column;
    }
    
    .publish-form input {
        width: 100%;
    }
    
    .feed-content {
        grid-template-columns: 1fr;
    }
    
    .feed-item-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .feed-item-stats {
        justify-content: center;
    }
}