:root {
    --accent-green: #31C332;
    --accent-green-dark: #28A229;
    --card-bg: #1C1C1C;
    --border-color: #2D2D2D;
}

body {
    background: linear-gradient(135deg, #141414 0%, #1C1C1C 100%);
    min-height: 100vh;
}

.navbar {
    background: rgba(28, 28, 28, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.navbar-brand {
    color: var(--accent-green) !important;
    font-weight: 600;
    text-shadow: 0 0 20px rgba(49, 195, 50, 0.3);
}

.card {
    background: rgba(28, 28, 28, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 32px rgba(49, 195, 50, 0.1);
    border-color: rgba(49, 195, 50, 0.2);
}

.card-title {
    color: var(--accent-green);
    font-weight: 600;
    text-shadow: 0 0 20px rgba(49, 195, 50, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-green-dark) 100%);
    border: none;
    color: #000;
    font-weight: 500;
    box-shadow: 0 0 20px rgba(49, 195, 50, 0.2);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-green-dark) 0%, var(--accent-green) 100%);
    transform: translateY(-1px);
    box-shadow: 0 0 30px rgba(49, 195, 50, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-green-dark) 100%);
    border: none;
    color: #000;
    box-shadow: 0 0 20px rgba(49, 195, 50, 0.2);
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--accent-green-dark) 0%, var(--accent-green) 100%);
    transform: translateY(-1px);
    box-shadow: 0 0 30px rgba(49, 195, 50, 0.3);
}

.form-control {
    background: rgba(45, 45, 45, 0.95);
    border: 1px solid var(--border-color);
    color: #fff;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.form-control:focus {
    background: rgba(45, 45, 45, 0.95);
    border-color: var(--accent-green);
    box-shadow: 0 0 20px rgba(49, 195, 50, 0.2);
}

.table {
    margin-bottom: 0;
    color: #fff;
}

.table > :not(caption) > * > * {
    background: transparent;
    border-bottom-color: var(--border-color);
    padding: 1rem;
}

.progress {
    background: rgba(45, 45, 45, 0.95);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--accent-green) 0%, var(--accent-green-dark) 100%);
    box-shadow: 0 0 20px rgba(49, 195, 50, 0.3);
}

.img-thumbnail {
    background: rgba(45, 45, 45, 0.95);
    border-color: var(--border-color);
    max-height: 200px;
    width: auto;
    border-radius: 8px;
}

.footer {
    background: rgba(28, 28, 28, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
}

/* Video list cards */
#videosList .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#videosList .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(49, 195, 50, 0.15);
}

/* Format selection table */
.table-hover tbody tr {
    transition: background-color 0.3s ease;
}

.table-hover tbody tr:hover {
    background: rgba(49, 195, 50, 0.1);
}

.feather {
    width: 18px;
    height: 18px;
    vertical-align: text-bottom;
}

.navbar-brand .feather {
    margin-right: 8px;
}

.btn .feather {
    margin-right: 4px;
}

main {
    margin-bottom: 100px;
}

/* Form customization */
.form-check-input {
    background-color: rgba(45, 45, 45, 0.95);
    border-color: var(--border-color);
}

.form-check-input:checked {
    background-color: var(--accent-green);
    border-color: var(--accent-green);
    box-shadow: 0 0 10px rgba(49, 195, 50, 0.3);
}

/* Alert styling */
.alert {
    background: rgba(28, 28, 28, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.alert-danger {
    border-color: #dc3545;
    color: #dc3545;
    box-shadow: 0 0 20px rgba(220, 53, 69, 0.2);
}

/* Animations and Transitions */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

#videoInfo, #videosList {
    animation: fadeIn 0.3s ease-out;
}

/* Modal-like card styling */
#videoInfo .card {
    background: rgba(28, 28, 28, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(49, 195, 50, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

#videoInfo .card:hover {
    border-color: rgba(49, 195, 50, 0.2);
    box-shadow: 0 8px 32px rgba(49, 195, 50, 0.15);
}

/* Format selection improvements */
.table {
    border-collapse: separate;
    border-spacing: 0 8px;
    margin-top: -8px;
}

.table > :not(caption) > * > * {
    background: transparent;
    border-bottom: none;
    padding: 1rem;
    vertical-align: middle;
}

.table tbody tr {
    background: rgba(45, 45, 45, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background: rgba(49, 195, 50, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(49, 195, 50, 0.1);
}

.table tbody td:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.table tbody td:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Videos list improvements */
#videosList .card {
    margin-bottom: 1.5rem;
    overflow: hidden;
}

#videosList .card-body {
    padding: 1.5rem;
}

#videosList .img-thumbnail {
    transition: transform 0.3s ease;
    margin-bottom: 1rem;
    border-radius: 12px;
    max-height: 180px;
    object-fit: cover;
}

#videosList .card:hover .img-thumbnail {
    transform: scale(1.02);
}

/* Alert improvements */
.alert {
    animation: fadeIn 0.3s ease-out;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

/* Download progress improvements */
#downloadProgress {
    animation: fadeIn 0.3s ease-out;
}

.progress {
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    background: rgba(45, 45, 45, 0.4);
    backdrop-filter: blur(10px);
}

.progress-bar {
    background: linear-gradient(90deg, var(--accent-green) 0%, var(--accent-green-dark) 100%);
    box-shadow: 0 0 20px rgba(49, 195, 50, 0.4);
}

/* Form styling improvements */
.form-check-input {
    width: 1.2em;
    height: 1.2em;
    margin-top: 0.25em;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background-color: var(--accent-green);
    border-color: var(--accent-green);
    box-shadow: 0 0 15px rgba(49, 195, 50, 0.4);
}

.form-check-label {
    padding-left: 0.5rem;
    user-select: none;
}