* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

body {
    background-color: #0f1115; /* Dark Background */
    color: #ffffff;
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    height: 100%;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: #161b22;
    padding: 20px;
    border-right: 1px solid #2f3640;
    display: flex;
    flex-direction: column;
}

.logo {
    font-size: 20px;
    font-weight: bold;
    color: #4a9eff;
    margin-bottom: 40px;
}

nav a {
    display: block;
    color: #8b949e;
    text-decoration: none;
    padding: 12px;
    margin-bottom: 5px;
    border-radius: 8px;
    transition: 0.3s;
}

nav a.active, nav a:hover {
    background-color: #1f6feb;
    color: white;
}

.credits {
    margin-top: auto;
    background: #21262d;
    padding: 15px;
    border-radius: 10px;
}

.progress-bar {
    height: 6px;
    background: #30363d;
    border-radius: 3px;
    margin-top: 5px;
}

.fill {
    height: 100%;
    background: #238636;
    border-radius: 3px;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 35px;
    height: 35px;
    background: #1f6feb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Input Area */
.input-section {
    background: #161b22;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #30363d;
}

textarea {
    width: 100%;
    height: 120px;
    background: #0d1117;
    border: 1px solid #30363d;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    resize: none;
    font-size: 14px;
}

textarea:focus {
    outline: 2px solid #1f6feb;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.ratio-btn {
    background: #21262d;
    border: 1px solid #30363d;
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    margin-right: 5px;
}

.ratio-btn.active {
    background: #1f6feb;
    border-color: #1f6feb;
}

#generateBtn {
    background: linear-gradient(45deg, #1f6feb, #4a9eff);
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

#generateBtn:hover {
    transform: scale(1.05);
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.video-card {
    background: #161b22;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #30363d;
    animation: fadeIn 0.5s ease;
}

.video-thumbnail {
    width: 100%;
    height: 150px;
    background-color: #000;
    position: relative;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-info {
    padding: 10px;
}

.card-info p {
    font-size: 12px;
    color: #8b949e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #238636;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
}

/* Loading Animation */
.hidden { display: none; }

.main-progress {
    width: 100%;
    height: 4px;
    background: #21262d;
    margin-top: 10px;
    border-radius: 2px;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: #1f6feb;
    transition: width 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
