:root {
    --primary-color: #ff4081;
    --primary-dark: #c60055;
    --primary-light: #ff79b0;
    --text-color: #e1e1e1;
    --text-secondary: #b3b3b3;
    --background-color: #121212;
    --card-background: #1e1e1e;
    --error-color: #ff5252;
    --success-color: #69f0ae;
    --pending-color: #ffd740;
    --border-color: #333;
    --elevation-1: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --elevation-2: 0 3px 6px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.12);
    --elevation-3: 0 10px 20px rgba(0, 0, 0, 0.15), 0 3px 6px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    letter-spacing: 0.3px;
}

/* Forms container and layout */
.forms-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 2rem 0;
}

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

/* Tab styles */
.tab-container {
    width: 100%;
}

.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}
option {
    background-color: var(--background-color);
}

.tab-btn.active {
    color: var(--primary-color);
}

.tab-btn.active::after {
    transform: scaleX(1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Torrent upload form styles */
.file-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.input-row {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.input-row .file-label {
    flex: 3;
}

.input-row .select-expiry {
    flex: 1;
}

.file-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-light);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-label:hover {
    background: var(--primary-dark);
}

.file-input {
    display: none;
}

.file-name {
    color: var(--text-secondary);
    font-size: 0.6rem;
    margin-left: 0.5rem;
}

/* Torrent specific styles */
.torrent-badge {
    background: var(--primary-dark);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.torrent-info {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 0.75rem;
    margin: 0.5rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    font-size: 0.85rem;
}

.torrent-info div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.torrent-info i {
    color: var(--primary-color);
}

/* Notification Styles */
#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--elevation-2);
    margin-bottom: 10px;
    min-width: 300px;
    opacity: 0;
    padding: 12px;
    transform: translateX(100%);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-icon {
    height: 24px;
    width: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.toast-message {
    flex-grow: 1;
    font-size: 14px;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    transition: color 0.3s ease;
}

.toast-close:hover {
    color: var(--text-color);
}

.toast-success .toast-icon {
    background: var(--success-color);
    color: #000;
}

.toast-error .toast-icon {
    background: var(--error-color);
    color: white;
}

.toast-warning .toast-icon {
    background: var(--pending-color);
    color: #000;
}

.toast-info .toast-icon {
    background: var(--primary-color);
    color: white;
}

/* Layout and Container */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-color: var(--background-color);
}

.container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
}

.card {
    background: var(--card-background);
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: 600px;
    box-shadow: var(--elevation-3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 2rem;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--elevation-3), 0 0 20px rgba(255, 64, 129, 0.1);
}

/* Form Elements */
.input-group {
    display: flex;
    gap: 1rem;
}

.input-group > input {
    flex: 5;
}

.input-group > select {
    flex: 1;
}

input, select {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    transition: all 0.3s ease;
    font-family: inherit;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(255, 64, 129, 0.1);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ff4081' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.5em;
    padding-right: 3rem;
}

/* Card Header and Description */
.card-header {
    text-align: center;
    margin-bottom: 2rem;
}
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}
a:visited {
    color: white;
    text-decoration: none;
}

.tagline {
    color: var(--primary-light);
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 20px rgba(255, 64, 129, 0.3);
}

.description {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border-radius: 16px;
    padding: 1.5rem;
    margin: 1.5rem auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--elevation-1);
}

/* Downloads Section */
.downloads {
    text-align: center;
    width: 100%;
    max-width: 600px;
    background: var(--card-background);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--elevation-3);
    margin: 0 auto;
}

.downloads-list {
    margin: 1.5rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.download-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.download-progress {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 3px;
    transition: width 0.3s ease;
}

.download-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

/* Download Actions */
.download-actions {
    display: flex;
    gap: 0.5rem;
}

.download-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    text-decoration: none;
}

/* Status and Actions */
.status-text {
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-pending {
    color: var(--pending-color);
}

.status-error {
    color: var(--error-color);
}

.status-success {
    color: var(--success-color);
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Button Styles */
.btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    text-decoration: none;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-delete {
    background: var(--error-color);
}

.btn-delete:hover {
    background: #ff1744;
}

.btn-retry {
    background: var(--pending-color);
    color: black;
}

.btn-retry:hover {
    background: #ffc400;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--elevation-1);
}

.btn:hover {
    background: var(--primary-dark);
    box-shadow: var(--elevation-2);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
    box-shadow: var(--elevation-1);
}

.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.3) 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform .5s, opacity 1s;
}

.ripple:active::after {
    transform: scale(0, 0);
    opacity: 0.3;
    transition: 0s;
}

/* File Icons */
.url {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.url i {
    color: var(--primary-color);
    width: 1.2em;
    text-align: center;
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-light);
}

/* Video Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    top: 50%;
    transform: translateY(-50%);
}

.close {
    position: absolute;
    right: 25px;
    top: 0;
    color: var(--text-color);
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

/* Responsive Design */
@media (max-width: 480px) {
    .card {
        padding: 1.5rem;
    }

    .forms-container {
        gap: 1.5rem;
    }

    .input-group {
        flex-direction: column;
    }

    .file-label {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .torrent-info {
        grid-template-columns: 1fr;
        padding: 0.5rem;
    }

    .description {
        padding: 1rem;
    }

    .toast {
        min-width: auto;
        width: calc(100vw - 40px);
    }
}
