/* Torrent App specific styling */
.torrent-app-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.torrent-input-section {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.torrent-input-section h2 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.input-group {
    display: flex;
    gap: 1rem;
}

.input-group .form-control {
    flex: 1;
    padding: 0.8rem 1.2rem;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.2);
}

.magnet-textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
    word-break: break-all;
}

.file-upload-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-wrapper:hover {
    border-color: var(--primary-color);
    background: rgba(168, 85, 247, 0.05);
}

.file-upload-label {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-msg {
    color: #ef4444;
    font-size: 0.9rem;
    background: rgba(239, 68, 68, 0.1);
    padding: 0.8rem;
    border-radius: 6px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Torrent List & Cards */
.torrent-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.torrent-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.torrent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.torrent-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-main);
    word-break: break-all;
    margin-right: 1rem;
}

.torrent-status {
    font-size: 0.9rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    white-space: nowrap;
}

.torrent-status.done {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.torrent-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-item i {
    color: var(--primary-color);
}

.progress-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    width: 0%;
    transition: width 0.3s ease;
}

.files-container {
    margin-top: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.file-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.file-name {
    font-size: 0.95rem;
    color: var(--text-main);
    word-break: break-all;
}

.file-actions {
    display: flex;
    gap: 0.5rem;
}

.file-btn {
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.file-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.file-btn.stream-btn {
    background: rgba(168, 85, 247, 0.2);
    color: #d8b4fe;
}

.file-btn.stream-btn:hover {
    background: rgba(168, 85, 247, 0.4);
}

/* Media Player Container */
.media-container {
    margin-top: 1rem;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    display: none;
}

.media-container video, .media-container audio {
    width: 100%;
    display: block;
}

@media (max-width: 768px) {
    .input-group {
        flex-direction: column;
    }
    
    .torrent-stats {
        gap: 1rem;
        flex-direction: column;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}
